The victory was Dallas' third straight, its longest winning streak since early January, and pulled the Mavericks within one game of first-place Houston in the Southwest Division.
DeMar DeRozan led the Raptors with 18 points. Toronto closed a stretch of four road games in five days with its third consecutive loss, one short of its season high. The Raptors are second in the Eastern Conference, their lead over No. 3 Chicago shrinking to one game.
Dallas' Rajon Rondo sat the final 20 minutes after having words with Mavericks head coach Rick Carlisle during a timeout. Rondo was dribbling past midcourt, the Raptors leading 62-53 four minutes into the third period, when Carlisle called out to Rondo and then called timeout.
Rondo played 18 minutes, more than 10 less than his average since joining Dallas in mid-December. He scored four points.
Dallas' backup backcourt provided 27 points - 14 from Devin Harris and 13 from J.J. Barea.
Toronto led 77-74 going to the fourth quarter before the Mavericks' shooting spurt. It included two 3-pointers by Barea and another by Nowitzki.
Amare Stoudemire scored six points in his second game with the Mavericks, four of them coming during the Dallas run early in the fourth period.
Greivis Vasquez added 14 points off the bench for the Raptors. Jonas Valanciunas had 10 points and nine rebounds, playing little after picking up his fourth foul late in the third quarter.
The Raptors built a 51-38 lead with 5:48 to play in the half before a three-guard Dallas lineup featuring Ellis, Rondo and Harris helped close the gap to 55-49 at halftime. Fifteen of the Raptors' points came off 10 Mavericks turnovers.
Toronto shot 53.3 per cent in the first half.
Nowitzki hit his first three field-goal attempts and scored nine points in the first 5 minutes after scoring only eight in Dallas' win over Charlotte on Sunday. He hit only one of his next six in the half, his 11 points leading the Mavericks.
Raptors: Head coach Dwane Casey was a Mavericks assistant under Rick Carlisle for three years, saying his former boss allows his assistants to think like head coaches ... During halftime, Chuck Hayes visited with former Kentucky teammate Rondo on the Dallas bench.
Mavericks: Chandler Parsons missed his second consecutive game with an injured left ankle. He'll return no earlier than Saturday, when Dallas hosted Brooklyn ... Owner Mark Cuban said he doesn't see the team making another roster move before the March 1 playoff eligibility waiver deadline. ... Nowitzki hit a 3-pointer two minutes in, his first since Feb. 7 to break and 0-for-10 streak.
Raptors: Host Golden State on Friday for their first home game in 16 days.
Mavericks: At Atlanta on Wednesday night.Suggest a correction