Updated

Rudy Gay has been nothing but solid since Toronto acquired him and he proved his worth yet again for the Raptors on Tuesday.

With 4.9 seconds left in the game, Gay sank the go-ahead basket to push Toronto past the injury-ravaged Denver Nuggets, 109-108, at Air Canada Centre.

Gay, who battled foul trouble in the second half, was held under 20 points for the first time since being traded but scored 17 in the Raptors' third straight win, with his final basket coming near the baseline as he rose above his defender to swish a short jumper.

DeMar DeRozan added 22 points and Kyle Lowry finished with 11 points and 10 assists in the win.

Without Andre Iguodala, Danilo Gallinari and Wilson Chandler -- who were all sidelined with injuries -- Ty Lawson stepped up to score 29 points, but he misfired on a running jumper as time expired. He also had nine assists.

"Everyone knew he was going to take the shot," said Denver coach George Karl on Lawson's final attempt. "Lawson was the first option, if he comes off clean he would have had a chance to take a better shot. He plays his ass off for me, he made enough shots, but enough things didn't go our way in the game."

The Nuggets, now losers of two in a row since winning nine straight, also lost JaVale McGee in the first half after experiencing soreness in his left tibia.

Anthony Randolph played a season-high 27 minutes and put forth 16 points with seven rebounds off the bench in the setback.

Prior to Gay's game-winner, the Nuggets had rallied to take a 108-107 lead late despite missing two of their starters and giving up seven fourth quarter 3-pointers.

John Lucas III, who scored 14 for the Raptors, buried four triples in the final period and Alan Anderson knocked down two from long distance as well, with his second staking Toronto to 105-102 lead with 2:16 to play.

"He knows how to shoot," said Gay on Lucas' clutch fourth quarter 3-point shooting. "We've made some changes to this point in the season and guys are getting a chance to play and see what they can do."

Lawson, who scored 10 in the final period, reduced the Nuggets' deficit to one with a driving score before Randolph put them ahead by one with 42 seconds left by hitting a pair of free throws.

The Nuggets lacked cohesion early without their key contributors and they struggled to contain Gay, who tallied 15 of his points in the first two quarters.

Denver fell behind 43-31 following their ninth turnover of the half, which led to an emphatic Terrence Ross tomahawk jam. However, after putting together a 10-4 push to close the second, the Nuggets found themselves behind by just two following a pair of Lawson layups just before the break.

Toronto briefly coughed up the lead in third, but got it back late in the period to take 82-78 edge into the fourth.

Game Notes

Toronto had lost 15 of its last 17 matchups with the Nuggets coming in ... The Raptors are now 4-2 since acquiring Gay ... The Nuggets fell to 11-17 on the road ... Anderson scored 10 off the bench for the Raptors ... Amir Johnson recorded his 12th straight game with at least one block for Toronto. He had two for the game and scored eight points ... The Nuggets outscored Raptors in the paint, 70-34.