MIAMI - Dirk Nowitzki and the Dallas Mavericks put a stunning end to their misery in Miami.

Now they can win their first NBA title without ever coming back to South Florida.

Nowitzki made the tiebreaking layup with 3.6 seconds left, and the Mavericks roared back from 15 points down in the fourth quarter to stun the Heat last night, 95-93, and tie the NBA Finals at one game apiece.

Capping a furious rally by scoring Dallas' final nine points, Nowitzki made two late baskets lefthanded - despite a torn tendon on that non-shooting hand. He finished with 24 points.

Dwyane Wade had 36 points for Miami, but his desperation three-pointer from 28 feet was off at the buzzer.

"I thought defensively we really got into them," Nowitzki said of the rally. "We pressured them fullcourt and we scrambled defensively. We even gave up some offensive rebounds, but we kept scrambling."

Game 3 is Sunday in Dallas.

Seemingly out of the game when the Heat led 88-73 with 7:15 remaining, Dallas held the Heat to just one field goal from there, a three-pointer by Mario Chalmers with 24.5 seconds that tied it just 2 seconds after Nowitzki's three had made it 93-90.

But after a timeout, Jason Kidd ran the clock down before getting the ball to Nowitzki, who drove into the lane, spun back to the left and made the layup.

"No question about it," Heat coach Erik Spoelstra said. "That's about as tough a fourth quarter as you can have. When it started to slide, it kept on going.

"We will bounce back.''

Jason Terry, largely silent since the first half of Game 1, fueled the comeback with a couple of jumpers and finished with 16 points. Shawn Marion had 20 points for the Mavericks, who had lost four straight Finals games in Miami since taking a 2-0 lead in the 2006 series.

They were about to go down 2-0 this time before Nowitzki, who insisted his injured finger wouldn't hinder him, led a rally even more amazing than the one that won Game 4 of the Western Conference finals, when the Mavs trailed Oklahoma City by 15 in the fourth quarter before pulling it out in overtime.

"We were just trying to stay solid," Mavericks coach Rick Carlisle said. "Look, James and Wade, they're two of the best facilitators - ever . . . They missed a couple shots and it allowed us to keep our momentum going."

LeBron James scored 20 points for the Heat. He and Wade were running by and over the older Mavs for three quarters, and it appeared the only thing that could slow them down was that big trophy they would soon be holding.

Not so fast.

Wade angered the Mavs, particularly Terry, when he held his follow-through after his three-pointer from the corner with 7:15 left capped a 13-0 run and made it 88-73.

The Heat suddenly went cold, holding the ball too long on possessions and forcing James and Wade to attempt long jumpers with the shot clock winding down, instead of playing to their strengths and driving into the lane. A series of those missed jumpers eventually ended with the Mavs getting possession, and Nowitzki making a layup that tied it at 90 with 57 seconds to play.

The Heat lost for the first time in 10 games at home in the playoffs and will have to win at least once in Dallas to force the series back to Florida.

"Just have to stay with it," said Miami's Chris Bosh, who had 12 points. "Don't get too high. Don't get too low. Just stay with the plan. We're faced with a challenge now. We have to win on the road. We've done it before. We shouldn't be surprised that's our situation."

Shaquille O'Neal, the center on Miami's 2006 championship team who announced his retirement on a Twitter video on Wednesday, was a teammate of both Wade and James during his NBA career. Yesterday he posted another video encouraging the duo to "go get that ring."

The Heat played a video tribute showing some of O'Neal's highlights in Miami during a first-quarter timeout.