TORONTO -- The Brooklyn Nets are going to the playoffs, and the Toronto Raptors are not.
However, the Raptors are trying to make the most of their remaining games to give them something to take into next season.
DeMar DeRozan scored 36 points Sunday, and the Raptors led all the way and held off the Nets for a 93-87 victory before a crowd of 17,617 at Air Canada Centre.
"Obviously it means nothing for the standings or our record. It's just the mentality we're starting to have around here, not giving up, working hard," said Toronto forward Rudy Gay, who scored 26 points and grabbed 10 rebounds. "This is a jump start for next year offensively and defensively."
The Raptors have won three in a row, including home-and-away wins against the Chicago Bulls, and five of their past six. Sunday's win was their first in four games this season against the Nets.
Amir Johnson added 10 points with nine rebounds for the Raptors, while Kyle Lowry had seven points, six assists and nine rebounds.
Deron Williams led the Nets with 30 points and seven assists, Brook Lopez added 16 points, Andray Blatche 15 and Joe Johnson 12. Reggie Evans had no points and 16 rebounds for the Nets (47-33).
The Raptors (32-48) led by as many as 21 points in the first half, but the Nets cut the lead to two in the fourth quarter.
"It definitely was a good show of heart, but we dug ourselves in a hole, and that was on us," Lopez said. "We didn't really have energy in the first half, but it was good to show some fight. It shows what they have. Obviously with DeMar, Rudy and Amir they have a lot of pieces. I think it could equate to something for them down the line."
The Raptors have two games left in the season.
"My main focus is to be competitive in the next two games and take some momentum into training camp next year and let the chips fall where they may," Raptors coach Dwane Casey said. "I think we've got a group here, a good core group, and we can build something solid and special."
Nets coach P.J. Carlesimo was an assistant coach with the Raptors early in DeRozan's career.
"To me, he's a good player," Carlesimo said. "He's a hell of a player. He was a good player when I was here two years ago. Has he improved? Yes. But I really think he went from promising player to a very solid guard."
DeRozan said, "I was just trying to be aggressive and not hesitate on my shots. Once I saw a couple go in, I felt good. I was just trying to go out there and get the win."
DeRozan was prominent throughout, and his two free throws with 31.5 seconds left gave Toronto a seven-point lead. Joe Johnson came back with a 3-pointer for the Nets.
Toronto's Kyle Lowry missed two free throws with 23.4 seconds to go, but the Nets couldn't take advantage, and when DeRozan hit two free throws with 15.3 seconds to play, it completed the scoring.
"I thought we played very well," Carlesimo said. "I thought the Raptors played a very good game. Our guys in the second half came out and defended. We just dug too deep a hole. We had a couple of opportunities, we had a couple of good looks when it was a one-possession game.
The Nets entered the fourth quarter down by 11 points after cutting into the 20-point deficit during the third quarter. Brooklyn quickly pulled within six, with Blatche scoring the first five points of the fourth. C.J. Watson hit a jumper with 6:50 to play to cut the lead to four.
The Raptors led by seven after DeRozan scored on a layup and made the free throw. The Nets came back again, and when Blatche made one of two free throws after Amir Johnson committed his fifth foul with 4:42 to play, the lead was down to two. Gay's driving layup and a free throw pushed the lead back up to five. Lowry hit one of two foul shots followed by Gay's jumper, giving Raptors a 83-75 lead with 3:36 left.
Williams pulled the Nets to within five, but DeRozan's 3-pointer with 2:18 to play restored the eight-point lead.
The lead was down to four on a 3-pointer by Williams, but DeRozan hit a pair of free throws to put the lead at six.
The Nets took possession on a turnover with 49.1 seconds left and Blatche cut the lead to four on a layup with 40.7 seconds remaining. Gay hit one of two free throws with 37.7 left and the Raptors led by five.
NOTES: Raptors center Jonas Valanciunas (neck) missed his second game in a row. "Hopefully he can play in the next two games," Casey said. ... Raptors guard Terrence Ross (sprained ankle) and forward Landry Fields (strep throat) were available for Sunday's game but didn't play. ... Nets forward Gerald Wallace (lower left leg contusion) did not play. ... With the possibility of a third seed in the playoffs still alive, Carlesimo has a problem with how much he should play point guard Williams, center Lopez and shooting guard Joe Johnson when the possibility exists to give them some rest before the postseason. He said he's talked to the players about it. All three started Sunday. "The sense was that we're playing well, so let's keep it going," Carlesimo said before Sunday's game. Lopez played 27 minutes, Joe Johnson 35 and Williams 39. ... The Nets are home Monday to the Washington Wizards. The Raptors visit the Atlanta Hawks on Tuesday.