MIAMI (AP) — When LeBron James' greatness almost wasn't good enough, officials began preparing for a San Antonio celebration.
Miami's championship reign would be over. Someone in Spurs black would replace James as NBA Finals MVP.
James and the Heat wouldn't let it happen.
"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 blessed to be a part of something like this," James said. "And I'm happy about the way we dug down and was able to get a win. It didn't look like we could muster up at some point in the game."
James powered Miami to a frantic fourth-quarter rally and overtime escape as the Heat beat the Spurs 103-100 on Tuesday night to extend the NBA Finals as far as they can go and keep Miami's repeat chances alive.
Losing his headband but keeping his cool while playing the entire second half and overtime, James finished with 32 points, 10 rebounds and 11 assists, making the go-ahead basket with 1:43 remaining in the extra period.
"It's by far the best game I've ever been a part of," James said.
He wouldn't let the Heat lose it — or their NBA title. If the Spurs want to take it, they'll have to fight just a little harder to get it.
One last game, winner take all.
So close to being eliminated that they noticed officials bringing yellow tape out to block off the court for the Spurs' trophy presentation, the Heat hit a couple of big 3-pointers and got some defensive stops — everything that makes a great team a champion.
"We seen the championship board already out there, the yellow tape. And you know, that's why you play the game to the final buzzer," James said. "And that's what we did tonight. We gave it everything that we had and more."
Tim Duncan scored 30 points for the Spurs, his most in an NBA Finals game since Game 1 in 2003, but was shut out after the third quarter. He added 17 rebounds.
Game 7 is in Miami on Thursday, the NBA's first do-or-die matchup to crown a champion since the Lakers beat the Celtics in 2010.
"They're the best two words in sports: Game 7," Heat coach Erik Spoelstra said.
And two the Spurs were oh-so-close to avoiding.
They looked headed to a fifth title in five chances when they built a 13-point lead with under 4 minutes left in the third quarter, then grabbed a five-point edge with 28 seconds left in regulation after blowing the lead.
But James hit a 3-pointer and Ray Allen tied it with another. Just 5.2 seconds remained in regulation. The Heat were that close to the edge.
"It's a tough moment. We were a few seconds away from winning the championship and we let it go," Spurs veteran Manu Ginobili said. "A couple rebounds we didn't catch, a tough 3 by Ray and a couple missed free throws. It's a very tough moment."
James was just 3 of 12 after three quarters, the Heat trailing by 10 and frustration apparent among the players and panic setting in among the fans.
Nothing to worry about. Not with James playing like this. He finished 11 of 26, even making a steal after his basket had given Miami a 101-100 edge in the OT.
Somewhere in there, early in the fourth quarter, James lost his familiar headband. He couldn't remember exactly when or how. Nor was it particularly important to him.
Losing the game would have been far worse.
"I guess the headband was the least of my worries at that point," James said.
Before that, he had been 12 minutes from hearing the familiar criticisms about not being able to get it done, from having to watch a team celebrate on his home floor again.
Then he changed the game and erased that story.
The Heat, who haven't lost consecutive games since Jan. 8 and 10, had too much defense and way too much James for the Spurs in the final 17 minutes. They are trying to become the fourth team to win the final two games at home since the NBA went to the 2-3-2 format for the finals in 1985.
This wasn't quite the 45-point performance in Game 6 of last year's Eastern Conference finals in Boston, but given the higher stakes it may go down as more important — if the Heat follow it with another victory Thursday.
"He just made plays. I don't think there's any two ways to put it," Duncan said. "We were in the right position to close it out and he found a way to put his team over the top and we just didn't make enough plays to do that."
Kawhi Leonard had 22 points and 11 rebounds for the Spurs. Tony Parker had 19 points and eight assists, but shot just 6 of 23 from the field.
The Spurs had one final chance down 103-100, but Chris Bosh blocked Danny Green's 3-pointer from the corner as time expired.
Bosh had said Green wouldn't get open the way he has all series — and he didn't. Green finished 1 of 5 from behind the arc after going 25 of 38 on 3-pointers (65.8 percent) in the first five games.
The Heat, the NBA's 66-win powerhouse during the regular season, will be playing a seventh game for the second straight round, having needed to go the distance to beat the Indiana Pacers in the East finals.
Parker's 3-pointer over James tied it at 89 with 1:27 left. He then came up with a steal, spinning into the lane for a 91-89 lead with 58 seconds to go. Miami coughed it up again and Ginobili made two free throws, and he hit another after a third straight Miami turnover to put the Spurs ahead 94-89.
But James nailed a 3-pointer with 20 seconds left, and the Heat had one more chance after Leonard made just one foul shot to give the Spurs a 95-92 edge. James missed but Bosh got the rebound out to Allen, the league's career leader in 3-pointers, who made another one from the corner to even it up.
The Spurs went ahead by three again in overtime, but James found a cutting Allen for a basket, then scored himself to put the Heat on top.
"He just plays with great force," Allen said.
Notes: James had his 11th postseason triple-double and second of this series. ... Allen moved two behind Kobe Bryant and Derek Fisher (48) for second place in finals 3-pointers. Robert Horry, a former champion with the Spurs, made 56 3-pointers in the finals. Horry held the Spurs' record for 3s in a Finals series with 15 in 2005 that Green has broken with his record 26. ... Duncan and Spurs coach Gregg Popovich appeared in their 210th playoff game together, moving 30 ahead of Phil Jackson and Bryant for most all-time.
Follow Brian Mahoney on Twitter: http://www.twitter.com/Briancmahoney