LATE COLLAPSE:The Spurs appeared to be heading for their fifth NBA title, before the wheels fell off late in the fourth quarter as they blew a 10-point advantage

The Miami Heat’s LeBron James slam dunks against the San Antonio Spurs in Game 6 of the NBA Finals at the American Airlines Arena in Miami, Florida, on Tuesday.

Photo: EPA

Defending champions the Miami Heat staved off elimination by beating the San Antonio Spurs 103-100 in overtime behind a 32-point performance from LeBron James to force Game 7 in the NBA Finals.

James made the game-winning jump shot in overtime and Ray Allen drained a two clutch free throws with two seconds left to seal it as the Heat stormed back from a 13-point deficit in front of a crowd of 19,900 at the American Airlines Arena on Tuesday.

The Heat evened the best-of-seven series at 3-3 after being down by five points with 28 seconds remaining in regulation.

“That was by far the best game I have ever been a part of,” James said. “To be part of something like this is something you would never be able to recreate once you are done playing the game.”

Game 7 is to be played today in Miami.

James scored 18 of his 32 points in the fourth quarter and overtime as he sparked the late comeback for the Heat, who trailed by 13 points late in the third quarter.

Poinr guard Mario Chalmers scored 20 points, while Chris Bosh added 10 points, 11 rebounds and two blocked shots for the Heat, who are a perfect 7-0 following a loss in the post-season. Miami dropped Game 5 in San Antonio on Sunday.

Tim Duncan finished with 30 points and 17 rebounds, while Kawhi Leonard had 22 points and 11 rebounds for the Spurs, who last won the title in 2007 when they knocked off a Cleveland Cavaliers team led by a young James.

“I don’t know what happened in the overtime and fourth,” Duncan said. “Just our shots weren’t there. It is a disappointing loss.”

San Antonio appeared to be heading for their fifth NBA title in franchise history when the wheels fell off late in the fourth quarter as they blew a 10-point lead entering the final quarter.

American Airlines officials even started preparing the court for the Spurs victory celebration, before the Heat went on a 6-1 run to close the fourth quarter and send the game into overtime.

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

Heat veteran Allen drained a clutch 25-foot three-pointer with five seconds to play in regulation time to tie the game at 95-95.

Tony Parker had a chance to clinch the win for the Spurs in regulation, but his shot at the buzzer from 12 feet never got near the rim.

“This is elite competition. Two teams that aren’t backing up,” Heat coach Erik Spoelstra said. “We feel very grateful we have an opportunity to play for a title in Game 7. There is nothing bigger than a Game 7.”

Allen helped spark Miami’s season-saving rally as he scored all of his points in the fourth quarter and overtime after missing his first four shots from the field.

He made a layup with six minutes left in the fourth to make it 84-82 and give the Heat their first lead since the opening quarter.

After the Spurs posted a wire-to-wire win in Game 5, Tuesday’s contest started out as a tight affair with four lead changes in the first quarter. Miami led 27-25 at the end of the first, but the Spurs went on a 17-4 surge to end the second quarter as they took a 50-44 lead into the locker room.

The Heat win spoiled a brilliant performance by San Antonio’s Duncan, who scored 25 points in the first half on 11-of-13 shooting from the field. Duncan scored half of the Spurs points in the first half.