Correction: An earlier version of this story carried an incorrect dateline. The game was played in Miami, not San Antonio. This version has been corrected.

On one side, jubilation; Chris Bosh joyously raising his fists after his closing block on Danny Green’s final three-point attempt allowed the Miami Heat to survive and keep its quest for another championship alive.

On the other side, dejection; Tim Duncan slouching his shoulders as he walked to the San Antonio Spurs’ locker room after coming so close to capturing his fifth championship before some questionable decisions and rare breakdowns.

The Spurs and Heat finally played a game that matched the quality of the two championship-tested teams. They traded highlight plays as if they were determined not to lose, while also supplying some ghastly gaffes. But the intensity was unlike any of the previous games, as San Antonio wanted to go home with a championship trophy and Miami was determined not have another team from Texas celebrate a title on its home court.

And in the end, Miami emerged with a 103-100 overtime victory that came down to the clutch shooting of reserve Ray Allen, and the timely everything else from the oft-maligned Bosh. The victory ensured that there will be a Game 7 on Thursday at American Airlines Arena.

“It was by far the best game I’ve ever been a part of,” LeBron James said afterward. “The ups and downs, the roller coaster, the emotions, good and bad throughout the whole game. To be a part of something like this is something you would never be able to recreate once you’re done playing the game. And I’m happy about the way we dug down and was able to get a win.”

The Post Sports Live crew discusses how many more NBA championships LeBron James has to win to be considered one of the greatest basketball players of all time. (Jayne Orenstein/Post Sports Live)

James had a triple double with a game-high 32 points, 11 assists and 10 rebounds, overcoming a rough start to score 16 fourth-quarter points and help his team rally from a 13-point second-half deficit. When the Heat needed to make plays, James received some timely assistance from some unusual sources.

With the Heat trailing by three near the end of regulation, Bosh rebounded a miss by James and Allen retreated to the corner, backpedaling until he knocked down a three-pointer over Tony Parker to tie the game at 95 with 5.2 seconds remaining. Then, after Allen forced Spurs guard Manu Ginobili into a late turnover and made two free throws, Bosh ended the game by tracking down Green and slapping the ball down in front of the Spurs’ bench.

Bosh then grabbed the ball and tossed it to the other end of the court as his giddy teammates circled him to celebrate.

As great as James was, Miami got big plays that won’t show in the stat sheet. Bosh had 11 rebounds, 10 points and two crucial blocks (the other coming on Parker in the closing moments of regulation) and Allen chipped in with the best nine-point game of his career. Bosh said afterward that Allen’s three-pointer saved the season; Allen ranked it among the best of the thousands that he has made in his 17-year career.

“It’s going to be a shot that I’m going to remember for a long time. There’s a lot of shots that I’ve made in my career, but this will go high in the ranks because of the situation,” Allen said. “It wasn’t looking good for us, but we’ve been resilient all year . . . And I’ve known my whole career sometimes you just get lucky. When you win championships, it involves a little luck. That right there was luck shining on our side.”

“You know, they’re the best two words in team sports, ‘Game 7,’ ” Heat Coach Erik Spoelstra said. “This is elite competition. Two teams that aren’t backing up. That’s what every competitor wants is to have the ultimate level of competition where you get tested. And we were tested, and they were tested as well.”

Duncan led the Spurs with 30 points but failed to score after the third period. Parker scored 19 points, but only had one point in overtime. And the Spurs will have plenty of anguish after being a few minutes from a fifth championship, only to have it slip away because of two missed free throws, rebounds that weren’t corralled and a failure to foul while holding a three-point lead.

“It was helluva game,” Spurs Coach Gregg Popovich said. “It’s a game of mistakes. And they ended up on the winning side.”

Popovich paid the price for several late-game moves. He pulled Duncan on the possession before Allen’s three-pointer, allowing Bosh to grab a rebound over Ginobili and Green. Then, in overtime, Popovich pulled Parker for defensive purposes, leaving Ginobili to race up the floor before having the ball stripped.

“Bad, very bad,” Ginobili said, when asked about letting the game slip away. “We were in a great spot. We just gave them another chance, and it hurts because it’s one of those moments where you’re going to be thinking about what we could’ve done better. So it’s terrible. . . . I have no clue how we’re going to be re-energized. I’m devastated.”

No team has won Game 7 on the road in the Finals since the 1978 Washington Bullets.

“It’s obviously disappointing, having the lead that we went into the fourth quarter with,” Duncan said. “The opportunities we had to close it out. It is what it is. It’s a one-game series now. Whatever you want to call it. Just a disappointing loss.”