TORONTO -- Back-to-back slam dunks by Serge Ibaka and OG Anunoby lifted the Toronto Raptors to a 104-101 win over the Atlanta Hawks on Tuesday night.

Kawhi Leonard led Toronto (31-12) to its third-straight win with 31 points, six assists and four rebounds. Kyle Lowry had 16 points in the first game that he and Leonard played in together since Dec. 9.

Ibaka finished with 13 points and Anunonby had 14.

John Collins had 21 points, seven in the fourth quarter, for Atlanta (12-28), while Jeremy Lin added 20 with nine assists.

Vince Carter had six points in 13 minutes of play for the Hawks in what may have been his final game in Toronto.

The 41-year-old played the first seven seasons of his 21-year career with the Raptors.

He told reporters earlier Tuesday that he wasn't quite ready to retire, despite being tied with Robert Parish, Dirk Nowitzki, and Kevin Garnett for longest career in NBA history.

Lowry missed 10 of 11 games with a thigh contusion and then lower back pain, only appearing against his hometown Philadelphia 76ers on Dec. 22, before returning for Sunday's 121-105 victory over Indiana.

Leonard sat that game out as Toronto continues to rest him for the second half of back-to-back games.

Toronto head coach Nick Nurse was happy to get his two superstars back on the court together to work out his play calling.

"It's pretty simple when one of them's on and one of them's off," said Nurse before the game. "It becomes a little harder, in a good way, when they're both on. It's a good problem that you've got two choices to make, who's bringing it, who isn't bringing it."

Lowry brought the crowd to its feet with a three-pointer from the corner to tie the game 68-68 near the midway point of the third quarter. The momentum continued to swing the hosts' way with the Raptors taking an 80-77 lead into the final quarter.

After exchanging field goals for the first four minutes of the fourth, Atlanta put together a 7-0 run capped by a Collins layup to take an 88-86 lead that forced Toronto to take a timeout with 8:20 left to play.

Pascal Siakam made a layup when play resumed and the Leonard sank a jump shot off a bad pass by Lin to re-take the lead but Collins answered right back with a jumper.

The back and forth play continued until the final minute of the quarter, with Leonard stealing the ball and leading the charge up the court. That sparked a series of Raptors passes around the arc until the ball made its way to a wide-open Ibaka, who dunked for a 102-101 lead with 17.1 seconds left to play.

On the next possession, Ibaka grabbed a rebound and passed the ball out to Lowry, who found a streaking Anunoby. The sophmore Raptors forward took flight and threw down a dunk to a thunderous cheer from the fans at Scotiabank Arena for the game's final score.

Carter got a standing ovation from the sold-out crowd of 19,800 before the announcer could even say his name as he entered the game at the 6:47 mark of the first quarter. He drew further cheers nearly a minute later when he drained a three-pointer that gave Atlanta a 19-15 lead.

The Hawks held a 31-28 lead after the opening quarter.

A rainbow three-point shot by Fred VanVleet gave Toronto a 56-54 lead with 44.3 seconds left in the half, but Daniel Hamilton replied with a three-pointer of his own to give Atlanta a one-point lead at intermission.

Notes: Raptors forwards Danny Green (rest) and CJ Miles (hip) sat the game out.