Dallas, TX (SportsNetwork.com) - Dirk Nowitzki finished with 25 points and eight rebounds as the Dallas Mavericks held off the Orlando Magic for a 107-102 win on Wednesday.

Monta Ellis scored 21 points and Devin Harris had 12 off the bench for the Mavericks, who won their third straight game.

"We've just got to do a better job of closing the game out especially bench guys," said Harris.

Elfrid Payton notched his first career triple-double with 15 points, 10 rebounds and 12 assists, while Victor Oladipo and Maurice Harkless netted 19 and 18 points, respectively, in the Magic's 12th consecutive road loss.

Orlando got within five as Harkless followed a Kyle O'Quinn trey with a dunk and Payton's driving layup made it a 96-91 game with 4:53 to play.

Payton knocked down a 3 to get the Magic within 101-98 with 2:10 to play and made it a one-point game on a pair of free throws with one minute left.

Harris was fouled following a missed Payton jumper and drained both free throws with 28.8 seconds remaining. Tyson Chandler blocked Oladipo's driving jumper and Nikola Vucevic missed on the putback.

Ellis split a pair of free throws, but Oladipo countered with a jumper. Oladipo missed from beyond the arc following a Harris free throw and Al-Farouq Aminu sealed the win with a pair from the charity stripe.

"This was one of the proudest halves we had together as a group," said Magic coach James Borrego. "To be down 22 in the Dallas, on the road, and shorthanded we didn't fold, we stuck together, we fought, we competed, and I'm just really proud of the effort, the intensity, the togetherness, the growth we're making, and I think we saw it in the second half."

Nowitzki and Chandler Parsons hit back-to-back 3s to give the Mavericks a 12-0 lead and they were in front 31-23 after 12 minutes of play.

Dallas' lead stretched to 17 points after Ellis ended a 9-2 spurt with a layup with less than two minutes remaining and the Mavericks led 65-48 at halftime.

After Nowitzki opened the second half with five straight points, Harkless' consecutive dunks ended a 9-0 Orlando run and cut the deficit down to 13 points.

Harris hit two 3s during an 8-2 burst and Nowitzki's trey with 2:18 left in the third staked Dallas to an 85-66 advantage.

Game Notes

Dallas has won seven straight games against Orlando ... Magic forward Tobias Harris did not play after spraining his left ankle in Tuesday's loss to Houston ... The Mavericks led by as much as 22 points.