NEW YORK, N.Y. - A Navy SEAL spoke to the Toronto Raptors before the season, reminding them there is never an easy day.

This started out looking like one, before the Raptors' fifth consecutive victory turned awfully difficult.

DeMar DeRozan scored 26 points, Amir Johnson made the tiebreaking basket with 41 seconds left in overtime, and Toronto beat the Brooklyn Nets 127-122 on Friday night.

Lou Williams finished with 25 points and Johnson had 24 for the Raptors, who led 12-0 and were ahead by 17 in the second half before needing some big plays from Johnson in the final minutes.

"In this league there is never an easy day," Toronto coach Dwane Casey said. "Our guys found a way."

Johnson made the tying dunk with 12 seconds left in regulation, and scored inside after DeRozan's shot was blocked to make it 124-122, making him 10 for 11 from the field.

"Amir and DeMar held it down tonight," Raptors point guard Kyle Lowry said. "They made all the winning plays."

Jarrett Jack scored a career-high 35 points while playing 52 minutes for the Nets, and had 13 assists and eight rebounds. Brook Lopez came off the bench for 35 points and 12 boards.

Brooklyn lost its fourth straight and finished a miserable 3-12 January with its seventh straight home loss. The Nets are winless here since a Dec. 29 victory over Sacramento.

Toronto had a series of double-digit leads during the first three quarters. But it turned into a tight game over the final 10 minutes, and the teams, which played a seven-game playoff series last spring, traded big shots — until Lopez missed a wide-open jumper on the final play of regulation.

He made up for that with a three-point play that tied it at 120, and Jack tied it for the final time at 122-all with 56 seconds to play. The Nets nearly got the ball back after Mason Plumlee stuffed DeRozan, but Johnson came up with it and put it in.

Brooklyn missed a couple jumpers on the next possession before DeRozan made two free throws, and Lowry added one more to finish it out.

"Jack and Brook played unbelievable," Plumlee said. "They really willed us, kept us in the game. Overtime we made some poor fouls."

A year after the Nets beat them in a Game 7 on their home floor, the Raptors extended the NBA's largest division lead to 13 1/2 games in the Atlantic over Brooklyn, which fell to 18-28.

Trying to solve their home woes, the Nets held a game-day morning workout here for the first time this season, but the Raptors sure seemed more comfortable at the start.

Toronto opened a 12-0 lead before the Nets even had a rebound and remained in control behind Williams, who had 18 points at halftime on just four shots. He was 10 for 10 at the free-throw line and made both of his 3-point attempts in just 10 minutes.

Toronto had a 17-point cushion in the third, but Jack sparked a 12-0 run early in the fourth while the Nets held the Raptors without a field goal for nearly the first 6 minutes.

"We could've folded, we could've tucked our tails a number of times throughout this game," Jack said.

"They handled the game the majority of the game in the first half, and to come out and fight and put up an effort against a team that's a damn good team, I thought we just represented ourselves well tonight, came out, fought hard and we just came up short a couple of possessions."

TIP-INS

Raptors: Center Jonas Valanciunas hurt his right ankle in the first half and returned to the locker room to get re-taped. ... Forward James Johnson missed the game after hurting his right hamstring earlier Friday. He will be evaluated Saturday.

Nets: Coach Lionel Hollins said the Nets had only had one other practice here this season, an open practice in the preseason that wasn't even much of a workout. He said he would like to practice here at least once a week, but acknowledged that would be difficult because Barclays Center hosts so many events. The Nets still practice in East Rutherford, New Jersey.

TOO CLOSE TO CALL

The Raptors took a 38-37 lead in the all-time series. The teams meet again Wednesday in Toronto.

UP NEXT

Raptors: Visit Washington on Saturday.

Nets: Host Los Angeles Clippers on Monday