The clock was ticking down and the ball was in Dwyane Wade’s hands with a chance to win the game for Miami. And here is a smattering of the thoughts that were going through the minds of various Timberwolves:

Andrew Wiggins: “He makes big shots, but you just hope he misses.’’

Interim coach Ryan Saunders: “It’s one of those things, you’ve seen him do it before. So you have flashbacks.’’

Wade pump-faked once, twice, a third time trying to get rookie Josh Okogie off his feet. Ultimately, Wade’s shot went up, hit the rim and bounced out as the horn blew.

Wolves 111, Heat 109.

 

This was Wade’s final game at Target Center, his retirement looming when this season ends, the Hall of Fame in plain sight. He has a career of titles and highlights. Maybe he didn’t need one more.

For whatever reason, the Wolves, who have nothing really to play for, beat the Heat, which is desperately trying to extend Wade’s final season by making the Eastern Conference playoffs.

It was the Wolves’ second consecutive victory, coming in front of an announced crowd of 17,763. On a night when the Heat got everything it wanted in the first half, the Wolves put on the defensive clamps in the second, rallying from nine down to win.

Dario Saric had his best game in recent memory, with 19 points, seven rebounds and five assists. Gorgui Dieng had another strong night, scoring 19 off the bench. Wiggins finished with 18 on 7-for-12 shooting.

Wade scored 24 points, but only three in the second half. Dion Waiters had 22.

It says something that on a night when the Heat harassed Karl-Anthony Towns from start to finish, forcing him into four offensive fouls and 11 total turnovers, the Wolves were still able to win against a desperate team.

“That’s what we’re rallying around,’’ Saunders said. “I’m a firm believer you don’t get better by picking up bad habits at the end of a season, rolling the ball out there and seeing what happens. You need to prepare, have a positive attitude about it. Because it’s going to carry over into the summer, and summer carries over to the preseason, then we go into the regular season.’’

Reeling it back to Friday …

After watching Wade score 21 points and the Heat shoot 62.2 percent while scoring 69 first-half points, the Wolves went to work after halftime. In the second half, the Heat shot just 39.5 percent; Miami’s 18 fourth-quarter points were the fewest by a Wolves opponent in a quarter since Jan. 30. The Wolves were down nine at halftime but within one after three, then took control down the stretch, going up six on Keita Bates-Diop’s running dunk with 2 minutes, 23 seconds left.

Waiters hit a three moments later. After a few Wolves misses, Wade stole the ball from Towns, drove and scored with 10 seconds left to pull Miami within one. With 4.7 seconds left, Bates-Diop made one of two free throws.

Out of the timeout, the ball got to Wade.

“Usually when you’re on your last dance, the basketball gods give you a three to go in,’’ said Towns, who made sure he got a Wade jersey to put up in his house. “But we toughed it out the whole game, played well, found a way to win.’’