Updated

DeMar DeRozan scored 36 points and the Toronto Raptors held off a second-half comeback attempt from the Brooklyn Nets to earn a 93-87 victory at Air Canada Center.

DeRozan finished 12-of-22 from the field and 3-of-4 from 3-point range to lead the Raptors to a third straight win and fifth in six games, with Rudy Gay contributing a double-double of 26 points and 10 rebounds to the triumph.

"I was just trying to go up there and get a win, just finish on a good note," DeRozan said.

The Raptors had a 21-point first-half lead cut down to two with 4 1/2 minutes left to play, but DeRozan and Gay combined for 15 of Toronto's final 16 points to thwart the rally and hand Brooklyn a loss that locked the Nets into the No. 4 seed for the upcoming Eastern Conference playoffs.

Deron Williams triggered Brooklyn's late charge by recording 22 of his 30 points after halftime, with Brook Lopez adding 16 points and Reggie Evans pulling down a game-high 16 rebounds.

"Our guys just dug themselves too big a hole," said Nets head coach P.J. Carlesimo. "In the second half we played hard, made shots, but you don't lose a game like that at the end. It got away from us in the first half."

Joe Johnson had 12 points for the Nets, who had won four in a row coming in, but hit on just 4-of-16 field goal attempts.

Down by double digits for much of the contest and trailing 70-59 entering the fourth quarter, the Nets closed the gap via a 9-2 run over the first five-plus minutes of the final frame and pulled within 72-68 on C.J. Watson's jumper with 6:50 to go. It was a two-point game a little over two minutes later at 77-75, with Toronto having made only two field goals for the period by that stage.

Gay then came through with a steal of Williams and was fouled on the subsequent layup, hitting the resulting bonus shot to give the Raptors a five- point edge. After Kyle Lowry hit 1-of-2 free throws on Toronto's next possession, Gay drained a clutch pull-up jumper with 3:37 remaining to make the score 83-75.

An Andray Blatche layup with 40.7 seconds left trimmed Brooklyn's deficit to 88-84, but the Nets knocked down only one more basket and Toronto did just enough at the foul line to prevail.

The Raptors set the tone early by beginning the game on a 14-2 run, with DeRozan pouring in nine points during the initial surge. The Nets regrouped later on, putting forth a 9-2 spurt to pull to within 21-20 in the final minute of the first quarter, but the Raptors had an answer.

Gay knocked down a 3-pointer at the opening-period buzzer to jump-start a 14-2 tear that put Toronto up by a 35-22 count just over four minutes into the second quarter. A 10-0 sequence, capped by Gay's alley-oop dunk off a Kyle Lowry feed, shortly afterward gave the Raptors a commanding 46-26 lead entering the final three minutes of the half.

Toronto cruised into the break carrying a 51-32 advantage behind DeRozan's 15 points on 7-of-11 shooting and Gay collecting 14 points.

"I'm feeling more comfortable with Rudy," said DeRozan of the Raptors' midseason acquisition. "We know where each other is on the court (a lot better)."

The Nets mustered only 12 points for the second quarter, but began to make some headway in the third. Williams accounted for all of Brooklyn's scoring during an 11-2 flurry that cut the Raptors' lead to 68-57 entering the final minute of a session in which the Nets outscored Toronto by a 27-19 margin.

Game Notes

DeRozan's point total was one shy of a career high set twice previously, most recently against Utah back on Nov. 12 ... Rookies Jonas Valanciunas (neck strain) and Terrence Ross (ankle) and forward Landry Fields (strep throat) were all held out of a second straight game by Toronto, while Brooklyn's Gerald Wallace missed a second consecutive contest due to a foot injury ... Brooklyn had won the first three meetings between the clubs this season and was aiming for its first season sweep of the Raptors since 2002-03.