Raptors shooting guard Anthony Parker (18) defends Vince Carter in a 107-106 victory over the Nets on Wednesday night. ((Bill Kostroun/Associated Press))

Trailing by one point with time winding down, New Jersey Nets point guard Devin Harris had the game in his hands — and missed.

Harris stepped back on defender Joey Graham to get a clean look at the basket as time expired, but his jump shot struck the front rim and the Toronto Raptors held on for a 107-106 victory over the Nets on Wednesday night.

"This is a momentum booster and a confidence booster," Graham said.

Graham put Toronto ahead by 12 points with 4:47 left, spinning in a finger roll and nailing the free throw to complete a three-point play and make it 102-90.

New Jersey responded with eight straight points, but Raptors forward Chris Bosh countered with a jumper and two free throws.

The Nets crept closer on a pair of three-point baskets from Bobby Simmons and another trey from Vince Carter with 65 seconds remaining, and Harris slashed it to 107-106 on a left-handed layup with 37.8 seconds on the clock.

When Raptors point guard Jose Calderon missed a jumper on the ensuing possession, Harris regained the ball and tried to win it outright on a 16-footer at the buzzer.

He missed.

"That is my go-to move," Harris said. "I couldn't ask for anything more."

"We got the stop we needed, the rebound and got down the court," Carter noted. "The shot was just off to the right."

Anthony Parker had 21 points, seven rebounds and six assists to pace the Raptors (19-28), winners of three straight games following a seven-game losing skid.

Bosh provided 18 points, Calderon counted 17 points and 11 assists, Graham chipped in with 15 points, and Jamario Moon and Jason Kapono had 10 points apiece.

"We were looking for stretches of games like this during our stretch of losses," Graham said. "We needed these games to get us back on track, to get us back in the playoff run."

"We have got to be more aggressive and try to make plays for one another," said Calderon, whose return from a strained hamstring has coincided with Toronto's first three-game winning streak since opening the season at 3-0.

"We need more games like tonight, where we make a good defensive play at the end. We knew we would turn this around."

Carter led all scorers with 27 points for the Nets (20-26), losers in seven of their last eight games.

He also pulled down a team-best 10 rebounds and doled out five assists.

Harris had 25 points and 10 assists, followed by Keyon Dooling with 17 points.

Simmons and Brook Lopez finished with 16 and 14 points, respectively, for New Jersey.

Scorching start for Carter

Mindful that he went 0-13 from the field the last time New Jersey welcomed the Raptors, Carter poured in 16 points in 10 minutes as the Nets built up a 27-21 lead through one. 

Toronto was outscored 18-3 from beyond the arc in the opening quarter, but closed out the first half with a 14-7 run that trimmed the deficit to 54-50 by the break. 

The Raptors rallied to take a 58-54 lead early in the third quarter on Bosh's mid-range jumper and consecutive treys from Parker and Calderon before shanking their next five shots. 

The lead changed hands several times in the third, with the teams tied 74-74 heading into the final two minutes.

Free throws from Graham, Kapono and Parker put Toronto up five points with 41.4 seconds left, and Kapono capped the 8-0 burst with a three-pointer.

Graham later hit two free throws as Toronto took an 84-77 lead into the fourth.

With files from the Canadian Press