Knicks guard Alec Burks, left, is hugged by teammate Immanuel...

Knicks guard Alec Burks, left, is hugged by teammate Immanuel Quickley after the Knicks defeated the Detroit Pistons 104-102 in an NBA basketball game, Sunday, March 27, 2022, in Detroit. Credit: Carlos Osorio

DETROIT — The Knicks were working their way through the final seconds of Sunday’s game, desperately clinging to a two-point lead that had been 21 at one point. With Little Caesars Arena maybe louder than you’d expect for the meeting of these lottery-bound teams, rookie Cade Cunningham took the ball with six seconds left and went to work.

But as the No. 1 pick in the 2021 NBA Draft dribbled and set up for a potential tying jumper, Alec Burks reached in and knocked the ball away as time expired, allowing the Knicks to escape with a 104-102 win.

The victory completed a sweep of the three-game road trip, leaving the 33-42 Knicks   4 1⁄2  games behind the Atlanta Hawks for the final play-in spot in the Eastern Conference with seven games remaining. It kept their slim hopes alive and likely frustrated those in the fan base hoping for better draft lottery odds.

“We knew it would be a challenge,” coach Tom Thibodeau said. “We had a really good road trip. We’ve played really hard, really well. Getting off to the start we did was huge. Playing from a lead. Then at the end, we had so many guys step up. Mitchell [Robinson], the rim protection was huge. Julius [Randle] made two huge plays for us . . . Those are winning plays. We want to play winning basketball.”

What seemed like a laugher early turned into anything but. Randle returned to the lineup after sitting out the previous three games, and the time away seemed to show as he looked a step slow and gassed. But he managed to deliver a pair of big buckets down the stretch, finishing with 20 points, seven rebounds and five assists. And he delivered a big assist, driving to draw the defense and finding Burks in the corner for a three-pointer that gave the Knicks a late four-point lead.

RJ Barrett led the Knicks with 21 points and Burks and Immanuel Quickley added 18 each. Detroit’s Marvin Bagley III had 27.

“I made my mind up yesterday after I worked out,” Randle said of returning from the strained quadriceps. “Felt good. The only thing that didn’t feel good was my conditioning. Other than that, I felt good. I was a little winded a couple of times. That’s why I’d rather play through pain than take time off, then trying to get back.

“Usually with things like that, I feel it more in the beginning of the game. As the game goes on, my conditioning kind of kicks in. I was fine. I was working with [assistant coach Johnnie Bryant] and telling him that and he was like, ‘Bro, trust me, you’ll be all right,’ and I was fine.”

“You could see it,” Barrett said. “He was rusty. He missed a bunch of free throws. That’s what happens. But he was still great nonetheless.”

The Knicks led by as many as 21 in the first half, with Quickley coming off the bench to provide a quick start. But by the time the game entered the fourth quarter, Detroit had cut its deficit to one.

With the score tied at 90, Thibodeau went back to Randle and he scored inside for the lead. After an exchange of mistakes, Randle drained a three-pointer with 4:21 left and the Knicks were up 95-90. Barrett then stole the ball from Cunningham and his layup pushed the lead to seven.

The Pistons moved within one before Randle drove and found Burks in the corner for a three-pointer with 45.4 seconds left that gave the Knicks a 104-100 lead.

Robinson swatted Cunningham’s layup out of bounds, but Killian Hayes scored on a driving layup, and after Barrett’s miss in the lane, the Pistons called time with 6.6 seconds left. That’s when Burks made his defensive play to seal the win.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME