(Getty Images)

It was hot at AT&T Center on Thursday night.

How hot was it?

It was so hot, LeBron James cramped up and had to leave the game and the Spurs won and just about everyone had some fun with the four-time MVP.

Here’s The Post’s Michael Lee, who was cramp-free as he described the scene:

LeBron James muscled his way around Boris Diaw for a layup that brought the Miami Heat within two points and then took one sideways gallop that ended his night. A severe leg cramp took over James’s left leg, leaving him frozen near his basket, waiting for play to stop so that he could somehow make the full-court journey back to his bench.

Dwyane Wade, Ray Allen, Mario Chalmers and Chris Bosh gathered around him, concerned. Every time James dragged his leg forward and grimaced, those worries morphed into fear — especially after James had to be carried to the bench, where he spent the final four minutes of the game as a spectator for what turned out to be a nightmarish finish for Miami in Game 1 of the NBA Finals.

With the game’s best player out, the San Antonio Spurs closed with a devastating 16-3 run to claim a runaway 110-95 victory. James scored a game-high 25 points before succumbing to heat of the AT&T Center, which was inexplicably without air conditioning because of a power malfunction and contributed to the four-time league’s most valuable player developing the ill-timed leg cramp.

James is not a Gatorade-endorser. Gatorade made sure everyone knew that on Twitter.

Shane Battier, James’s Heat teammate, said the temps inside the stadium reminded him of his college days.

Twitter was not exactly sympathetic to James’s malady.

It isn’t the first time strange things have gone on at AT&T Center. Remember the snake?