DALLAS, April 1 (UPI) -- Dirk Nowitzki scored 30 points Wednesday and Dallas survived a wild fourth quarter to edge Miami 98-96.
The Mavericks moved to within 1 1/2 games of Utah in the fight for seventh place in the Western Conference, a position that keeps a team from having to play the powerful Los Angeles Lakers in the first round of the playoffs.
Miami, which holds down the fifth seed in the Eastern Conference, had a two-point lead going into the fourth quarter and the lead changed hands 11 times in the period.
Dallas took the lead for good at 95-94 with 2:50 to play on a layup by Nowitzki, but Miami was still within a point with 33 seconds remaining after Michael Beasley hit two free throws.
Jason Kidd then missed a 3-point attempt for Dallas as the shot clock ran out, but Miami's Mario Chalmers was called for an offensive foul with 2 seconds left to end the Heat's final chance.
Jason Terry made a free throw with a second to go for the final score.
Josh Howard added 20 for the Mavericks, who won their second straight. Miami got 23 points from Dwyane Wade.