DALLAS, Nov. 22 (Ticker) -- The Houston Rockets looked to end the Dallas Mavericks' winning streak. Dirk Nowitzki had other plans.

Nowitzki scored 31 points and Jason Terry added 29 as the Mavericks squeezed out a 102-93 victory over the slumping Rockets to extend teir winning streak to six games.

NBA TV highlights from
With the Mavericks leading, 89-87, and 5:35 left, Houston's Stromile Swift - who has made one 3-pointer in five-plus seasons - fired an airball 3-pointer. Nowitzki capitalized, drilling a momentum-changing 3-pointer from top of the key.

"That was a bad read to throw him the ball there," Rockets coach Jeff Van Gundy said. "Obviously it wasn't a great shot, but Yao (7-5 center Yao Ming) was wide open in the middle of the lane and we inbound into 3-point range."

"We found a way to win and that's big," Nowitzki said, who made 11-of-19 shots.

Devin Harris added another dagger, drained a jumper as the shot clock expired with 3:24 to play pushing the advantage to 94-89. DeSagana Diop added four free throws to widen the lead.

"We just had to get stops in the fourth quarter," said Harris, who scored seven points. "Once we got stops and rebounds, it was just a matter of time before we got back into the game."

Josh Howard had 15 points and 11 rebounds and Marquis Daniels scored 10 points for the Mavericks (8-2), who outrebounded the Rockets, 17-8, on the offensive boards.

Trailing 53-48 at halftime, Dallas put together a 17-5 run in the third quarter. Nowitzki scored seven points and Terry added four during that stretch.

"We needed an energy boost at that point," said Terry, who shot 4-of-8 from 3-point range. "The guys rebounded and kicked it to me and I was able to knock them down."

Rockets rookie Luther Head had a season-high 28 points and seven rebounds in his second start of the season. Yao scored 20 points and Derek Anderson added 19 off the bench for Houston, which has lost four in a row.

"It was the Luther Head show," said Mavericks coach Avery Johnson, who has guided the team to its second-best 10-game start. "We had no answer for Luther tonight."