Jimmy Butler’s triple-double propelled Miami to a 111-108 victory over the Los Angeles Lakers on Friday that kept the Heat alive in the NBA Finals.

Butler scored 35 points with 12 rebounds and 11 assists and the Heat withstood a 40-point performance from Lakers superstar LeBron James to deny Los Angeles a title-clinching win in the NBA’s quarantine bubble at Orlando.

The Lakers still lead the best-of-seven series three games to two and can secure the title with a game-six victory on Sunday.

Game seven, if needed, will be on Tuesday.

“We’ve got two more to get,” said Butler, who played more than 47 minutes and delivered a stunning display of will and skill.

“We just played hard, and just stayed with it,” said Butler, who has insisted the Heat can become just the second NBA team to rally from a 3-1 deficit to win the championship series.

The only other team to do it was the James-led Cleveland Cavaliers against Golden State in 2016.

“We got where we wanted to on offense, shared the ball like we always do,” Butler said.

“This is a game of runs — I think we withstood theirs.”

Butler drained two free throws with 16.8 seconds left to put Miami up by one.

James, stymied under the basket, found Danny Green for a wide-open three-pointer with 7.1 seconds remaining but Green missed and Tyler Herro added two more free throws to seal it.

“We got a hell of a look to win the game, to win the series,” James said. “Didn’t go down.”

On a night that saw the Heat lead much of the way, Kentavious Caldwell-Pope’s three-pointer with 6:18 remaining put the Lakers up 97-96 — their first lead since the first quarter.

But the Heat dug in, Duncan Robinson’s three-pointer putting Miami back up, 101-99 with 3:16 remaining, and it was a heavyweight slugfest the rest of the way, the lead changing hands seven more times.

“It was all about getting stops, getting what we wanted on offense,” Butler said. “I still don’t think we rebounded the ball the way we were supposed to close out the game.

“This one, it was a little bit of luck that Danny Green missed that one at the top of the key.”

Duncan Robinson added 26 points for Miami. Kendrick Nunn had 14, Bam Adebayo 13, Herro 12 and Jae Crowder 11.

James added 13 rebounds and seven assists for the Lakers.

Anthony Davis added 28 points and Caldwell-Pope scored 16.

The frantic finish was foreshadowed by a first quarter that saw eight lead changes.

The tension was palpable when Los Angeles center Dwight Howard tangled with Butler and the two had to be separated less than five minutes into the contest, each receiving a technical foul.

The Lakers got an early injury scare when Davis, battling Andre Iguodala for a rebound late in the first quarter, took an awkward hop and limped off the court.

Lakers ‘got to be better’

The Lakers, trailing 25-24 through one quarter, said Davis had aggravated a right heel contusion. He stayed on the sideline, testing the injury as the game continued and returning in the second quarter.

The Heat twice pushed their lead to 11 points in the second period, Nunn’s putback layup making it 50-39 with 3:41 left in the first half.

Butler poured in 22 points in the first half on seven-of-10 shooting on the way to his second triple-double of the series.

He’s just the sixth player in NBA Finals history to have multiple triple-doubles in the title series, and just the second, along with James, to have multiple 30-point triple-doubles in the same Finals.

James made sure the Lakers kept it close with 21 first-half points while Davis had 13 before the break.

But the Lakers’ bid for a record-equalling 17th NBA title — their first since 2010 — was at least temporarily denied.

“We’ve just got to be better in game six and close the series,” James said.