MIAMI — The reigning champion Miami Heat staved off elimination and evened the NBA Finals at three wins each, defeating the San Antonio Spurs 103-100 in overtime Tuesday night at AmericanAirlines Arena.

The deciding Game 7 will be played Thursday night in Miami.

Miami’s LeBron James had a triple-double, 32 points — including 18 after the third quarter — 10 rebounds and 11 assists. Mario Chalmers (20 points), Dwyane Wade (14 points) and Chris Bosh (10 points) also contributed.

Tim Duncan scored 30 points and grabbed 17 rebounds to lead the Spurs. Kawhi Leonard had 22, and Tony Parker added 19. Manu Ginobili (nine points) and Danny Green (three points) were relatively quiet for the Spurs.

With San Antonio trailing 101-100 in OT, Parker had a chance to put the Spurs on top, but Bosh blocked his jumper. Ginobili had a similar chance, but he missed a drive, with the refs declining to a whistle a possible foul.

Miami’s Ray Allen then made two free throws for the final margin.

On San Antonio’s final chance, Bosh blocked a corner 3-point try by Green as time expired.

The Heat have not lost consecutive games since Jan. 10. However, Miami also has alternated wins and losses for 12 consecutive games, and if that pattern holds, the Spurs would win their fifth NBA title since 1999 on Thursday.

A missed free throw by Leonard opened the door, and Allen took advantage, making a right-corner 3-pointer with 5.2 seconds left in regulation, sending the game to overtime at 95-95.

After Allen’s shot, Parker drove the length of the court and missed an off-balance shot over Bosh.

The Heat started the fourth quarter with a 19-7 run to seemingly take control of the game.

However, San Antonio delivered an 8-0 run in the final 90 seconds to push the Heat to the brink of elimination.

James committed two turnovers in the those final moments, but he recovered to hit a 3-pointer with 20 seconds left to slice the Spurs’ lead to 94-92.

Leonard then missed the first free throw and made the second to put the Spurs up 95-92, setting up Allen’s heroics.

The Spurs led 75-65 after three quarters, but there were some wild spurts.

The Heat closed to within 57-56 in the middle of the quarter, but the Spurs responded with an 11-0 run.

The Spurs led 71-58, their largest advantage of the game, before the Heat put together a mini streak of five straight points. But James and Wade missed layups on successive possessions — both were begging for foul calls — and Parker and Gary Neal hit runners on the other end to kill the Heat’s momentum.

The Spurs closed the first half on a 17-4 run to take a 50-44 lead into intermission. Duncan had 25 first-half points on 11-of-13 shooting. It was his biggest first half since 2006.

Duncan’s brilliance minimized the need for offensive excellence by Spurs starters Ginobili (no first-half points), Green (three) and Parker (four).

Meanwhile, James had just nine points on 3-of-9 shooting before halftime, although he did have five assists. James went 0-for-4 against Boris Diaw.

Miami’s Wade and Bosh were also fairly quiet with six first-half points each.

The Heat, led by 10 points from Mario Chalmers, led 27-25 after the first quarter. Chalmers made four of six shots in the period, including two of three 3-pointers.

Things were really going the Heat’s way early when Shane Battier unintentionally banked in a 3-pointer, and Diaw threw up an air ball.

The Spurs stayed in the game thanks to Duncan, who went 6-for-6 in the first quarter, scoring 12 points. Leonard was also good, making three of four shot for eight first-quarter points.

GAME NOTES: The Spurs and Heat went with their same starting lineups from Game 5. … In a knee-on-knee collision, Wade was called for charging into Ginobili in the first quarter. Wade came away limping but stayed in the game. … Heat F Chris “Birdman” Andersen, who was not used in the two previous games, entered Tuesday with 1:41 left in the first quarter. He made an impact — literally — in the second quarter, diving into the second row to save a ball. … Leonard gave the Heat’s Mike Miller a “facial” in the first quarter, dunking on the Heat wing while hitting him in the face with his off hand.

NBA NOTES: Injured Oklahoma Thunder point guard Russell Westbrook is off crutches and ready to begin the next stage of his rehab from a torn meniscus. Westbrook posted a video through his Vine social media site in which he pretends to smash a crutch over his knee and throws it a pool. He then clutches a basketball in a shooting motion, and says, “I’m back.” It’s been just more than six weeks since Westbrook had his surgery. He was hurt his knee in Game 2 of the opening round of the NBA playoffs against the Houston Rockets in a collision with Patrick Beverley, and he missed the rest of the postseason.