Nets guard Kyrie Irving reacts after a basket in overtime of...

Nets guard Kyrie Irving reacts after a basket in overtime of the game against the Detroit Pistons in Detroit on Saturday, Jan. 25, 2020. Credit: AP/Paul Sancya

DETROIT — Kyrie Irving was at the top of his game when the Nets needed it most.

Irving scored 45 points and turned the ball over only once to lead the struggling Nets to a 121-111 overtime win over the Detroit Pistons on Saturday.

The win ended the Nets’ losing streak at five games.

It was only Irving’s sixth game since his return from a shoulder injury that sidelined him for 26 games. It was his second-highest-scoring game as a Net behind the 50 points he produced in a season-opening loss to Memphis.

“Yeah, it was about time,” Irving said when asked if he thought he needed to step up and have a big performance. “The last few games, I’ve been kind of in between in terms of being aggressive.”

There was nothing in between about the way Irving played Saturday, especially at the start of the third quarter, when he scored the Nets’ first 12 points to help them come back from a 10-point halftime deficit. Irving finished with 17 points in the quarter and 29 in the second half. He also had seven assists and six rebounds in 40 minutes.

“Kyrie set the tone in the second half,” coach Kenny Atkinson said.

The Nets also got 20 points, 15 rebounds and four blocked shots from Jarrett Allen and 16 points from Joe Harris. Spencer Dinwiddie, who had 10 points and five assists off the bench, contributed a big layup at the start of overtime as the Nets outscored the Pistons 15-5.

The Pistons were led by Derrick Rose’s 27 points. Rose forced the game into overtime when he went the length of the court for a layup that tied the score at 106 with 1.9 seconds left.

Andre Drummond had 20 points and 21 rebounds for the Pistons (17-30).

The game began a key 10-game stretch for the Nets (19-25) heading into the All-Star break, one that could very well determine if they will be able to right their season. Saturday’s game was the first of seven straight against teams with losing records, and their final three games heading into the break are against the Raptors (twice) and the Pacers.

“Yeah, we’ve got to make up some ground. I think there’s no doubt about it,” Atkinson said before the game. “It’s a good time. I think we’re getting healthier, that helps. The schedule lightens up a little, though there are no easy games, as we all know.”

The win couldn’t have come at a better time for the Nets.

“It’s important to go into the All-Star Game with momentum and then come out ready to attack the last part of the season,’’ Atkinson said. “We’ll have some important games coming up.”

Next up for the Nets are the Knicks — who have lost 10 of their last 12 and have the second-worst record in the Eastern Conference — on Sunday night at Madison Square Garden.

Notes & quotes: Dinwiddie, who had started 32 straight games before Saturday night, was replaced in the starting lineup by Garrett Temple. The last time Dinwiddie came off the bench was Nov. 14 in Denver, which also was the last game Irving played before he went out with a right shoulder impingement. Atkinson, who did not announce his lineup until 40 minutes before the start of the game, downplayed suggestions that tinkering with the starters is a big deal. “I would say it’s not who starts, it’s who finishes,” he said. “The starters for you guys, I know it’s a big thing. It’s who ends up playing the minutes, who ends up finishing the game . . . That’s where we put most of our thought.”

More Brooklyn Nets

DON'T MISS THIS LIMITED-TIME OFFER1 5 months for only $1Save on Unlimited Digital Access