Nick Nurse's timeout is under scrutiny by ... everyone. (Claus Andersen/Getty Images)

The timing of the timeout, it turned out, could not have been worse.

With Kawhi Leonard on fire, Golden State’s lead gone and the Toronto Raptors ready to pop champagne to celebrate their first NBA championship, Raptors Coach Nick Nurse had his reasons for taking a second straight timeout with just over three minutes left in Game 5 of the NBA Finals. The break came just after his team had gone on a 12-2 run (fueled by Leonard’s 10 straight points) for a 103-97 lead, and it was precisely what one team needed.

Unfortunately for the Raptors, that team was the Warriors.

When play resumed, Leonard threw up an air ball, and the Warriors took a 106-103 lead by ripping off three three-pointers (two by Klay Thompson, one by Stephen Curry). They went on to a 106-105 win. The biggest mystery as the series heads to Oakland for Game 6: What was Nurse thinking?

“Those two we took at the three-minute mark . . . we had two free ones that you lose under the three-minute mark,” Nurse told reporters. “And we’d just came across and just decided to give those guys a rest. And we had back-to-back ones there that we would have lost under the three-minute mark and just thought we could use the extra energy push.”

Nurse isn’t the only NBA coach who might have opted to use his timeouts; the rule limits teams to two during the final three minutes of the fourth quarter. Extra timeouts are lost.

“At that time I felt that he probably wanted to get us some rest,” Leonard said. “You never know. I mean, if we would have won the game, we wouldn’t be talking about it.”

The surging Raptors didn’t seem to need the breather, but the Warriors, minus the injured Kevin Durant and Kevon Looney, did.

“Absolutely,” Draymond Green admitted. “They had got it going there. We took [their] timeout. We were able to gather ourselves, draw up a play. I think that timeout allowed us to settle in.”

Even though Game 5 will be best remembered for Durant’s devastating injury, Nurse was relentlessly second-guessed for a crucial decision that deflated a boisterous crowd just waiting to celebrate the first championship in the franchise’s 24-year history.

History will show that the Raptors contributed to their loss in other ways. They scored only two points after the timeout, missed five of their final six shots (including three three-pointers) and committed a turnover that led to Curry’s game-tying three with 1:22 left. And Green saved the Warriors’ season with a block on a three-point attempt by Kyle Lowry that would have won the game at the buzzer.

“I think that in this day and age, up six with three minutes to go doesn’t mean a whole lot,” Nurse said. “You got to keep playing and getting good shots and keep guarding. We have been a really good close-game team this year, both ends of the floor. We really guarded in the second half; we held them to 22 each quarter, and I felt good at that point. Just needed to make a couple more plays.”

Sign up for our weekly NBA newsletter to get the best basketball coverage in your inbox

Read more from The Post:

Perspective: In Warriors’ epic must-win, NBA Finals get eclipsed by Kevin Durant’s injury

Warriors survive Game 5, but Kevin Durant injures his Achilles': ‘Incredible win and a horrible loss’

Toronto fans blasted for cheering after Kevin Durant’s brutal Game 5 injury