TORONTO — Golden State Warriors star Kevin Durant walked onto the court an hour before tipoff of Game 5 against the Toronto Raptors on Monday night.

He was preparing to do his pregame workout ritual. It was the first time in over a month — since sustaining a right calf injury in Game 5 of the Western Conference semifinals — that the 10-time All-Star worked out in a public setting.

Over the past two weeks, Durant fought valiantly to push up his return date. With his team down 3-1 in the NBA Finals, he wanted to give it a go and the team doctors subsequently cleared him. Going through this pregame warmup was the final step to returning to genuine game action.

This was a joyous time for him and the organization.

But on his way to the Warriors’ basket, he was met with blaring boos. And then the antics ramped up when Durant began shooting midrange jumpers. On misses, the crowd camped around the lower bowl collectively started cheering. On makes, it collectively went silent as a way to irritate him.

“Damn, they’re really f---ing with this man after what he’s been through?” a Scotiabank Arena security official said. After approximately 15 minutes on the court, Durant retreated to the locker room as a series of boos showered down on him.

He had no reaction.

View photos Kevin Durant was injured two minutes into the second quarter in Game 5 on Monday night. (Photo by Gregory Shamus/Getty Images) More

This was just the beginning of an ugly night, a night in which the Warriors staved off elimination with a 106-105 win in Game 5 of the NBA Finals to send the series back to Oakland but ended up paying a steep price.

Early in the contest after Durant picked up his first personal foul, chants of “KD sucks!” broke out, which baffled a few Raptors fans because this was a player capable of dramatically changing the course of the series.

But even before Game 5 came around, Durant had heard it all.

In the initial stages of his postseason absence, the narrative circulating was that the Warriors were a better team without him. Toward the middle of his time being sidelined, some took issue with him remaining in the locker room and not sitting on the bench with his team. In the latter stages of his rehab, the chatter shifted to the possibility that he was milking the injury to prove to the Warriors how desperately he was needed to win another championship.

Family, teammates and confidants routinely checked on Durant during his quest to rejoin his guys on the court. Each time, Durant explained that he was working to speed up the process but was still experiencing discomfort pushing off his right foot, league sources told Yahoo Sports.

Sources described Durant as being in agony because he was unable to help his teammates.

Some of Durant’s NBA peers who are interested in his next free-agent destination wondered if he’s happy in the Bay Area and plotted how to pitch their teams to the future Hall of Famer.

Durant, of course, learned of these inquiries.

“I can’t be recruited,” Durant told Yahoo Sports last week. “Write that.”

Even though he was cleared for Game 5, Durant was not anywhere close to 100 percent, sources said. The individual workout sessions and the light practice session on Sunday could not simulate the rigors of an ultra-competitive championship game.

And then two minutes into the second quarter, the worst transpired.

Durant attempted to drive by Serge Ibaka on the right wing, lost the ball and immediately began to hobble before falling to the hardwood. He grabbed his lower right leg. He was in shock, and he rubbed it a few more times as play stopped. Eventually, he signaled for the training staff.

As Quinn Cook and Klay Thompson helped him up, fans started cheering. Kyle Lowry, Ibaka, Pascal Siakam and Danny Green promptly directed the fans to cut it out. And only then did they switch to cheers and chants of “KD! KD!”