Updated

Dirk Nowitzki scored 21 of his 35 points in the fourth quarter as the Dallas Mavericks rallied Wednesday night for a 117-110 victory over the Houston Rockets, whose playoff hopes took another blow.

Jason Terry put the Mavericks ahead to stay with a 3-pointer that made it 93-92 with 7:37 left.

By the time Nowitzki completed a three-point play 3 1/2 minutes later, the Mavericks led 102-94. That wrapped up a 20-6 run their 11-time All-Star forward started with consecutive 3-pointers.

The Rockets have lost five in a row, matching their longest losing streak of the season. That dropped Houston a half-game behind Phoenix for the eighth and final playoff spot with four games left.

Vince Carter added 23 points and Jason Terry 19 for the defending NBA champion Mavericks, who can clinch a playoff berth with a win over Golden State in their regular-season home finale Friday night.

Dallas was coming off consecutive overtime losses, including a triple-overtime game at Utah on Monday night when Nowitzki played 53 minutes.

Against the Rockets, Nowitzki was 10-of-18 shooting while making all 12 of his free throws — 10 of them in the last 2 1/2 minutes of the game.

Goran Dragic had 20 points to lead seven Rockets in double-figure scoring. Dragic also had 10 assists, and Marcus Camby had a double-double with 11 points and 17 rebounds after missing the previous game because of his back. Luis Scola had 18 points for Houston, Chase Budinger 14, and Chandler Parsons 12.

Houston was up 71-62, its largest lead, when Scola made a short bank shot midway through the third quarter to wrap up an 11-0 run.

The Rockets still led by eight after Scola made two free throws in the closing seconds of the third. But when Carter missed a 3-pointer, Brandan Wright grabbed the rebound and beat the buzzer with a 10-foot jumper.

Budinger's pull-up jumper with 10 minutes remaining had Houston up 88-82 before Nowitzki hit the first of his consecutive 3s.

After Terry's go-ahead 3, Carter followed with one of his own at the 7-minute mark.

Soon after that Terry was fouled and went hard to the ground while driving for a dunk attempt. After staying down for several minutes and coach Rick Carlisle calling timeout, Terry got up and walked away smiling and urging the crowd the get loud.

After the Friday home finale, the Mavericks close the regular season at Chicago and Atlanta.

Houston, trying to hang on to the last playoff spot, plays at New Orleans on Thursday. The Rockets have home games left against Golden State and the Hornets with a trip to Miami in between those.

Phoenix, which played later Wednesday night, owns the tiebreaker against Houston since the Suns won two of three in the season, including a 112-105 victory at Houston last Friday.

Jason Kidd has 12 points on four 3s for Dallas while Delonte West had 11 points after finding out earlier Wednesday he had been fined $25,000 by the NBA for jabbing his finger in the ear of Utah swingman Gordon Haywood in Monday night's game.

The Mavs were down 51-46 before Kidd made three 3s in a 90-second span late in the first half. But Scola's two free throws with 30 seconds left tied the score 55-all at the half.

The game was tied 27-all after the first quarter, when Carter scored the last 10 Mavericks points. He capped that run with consecutive slam dunks in a 20-second span.

NOTES: Terry broke a tie with Chauncey Billups (1,783) for No. 4 on the NBA career 3-pointers list with his first one Wednesday night. He had three pushing his total to 1,786. At No. 3 on the list is Kidd, who has 1,874 after his latest four. ... The start of the game was delayed briefly because of problems with the sound system at the American Airlines Center. The game was about to tip off without introductions before part of the sound came back on. The starters were then introduced, but without the usual production of loud music with the lights down.