LAKE BUENA VISTA, Fla. — Anthony Davis punched his chest in celebration. LeBron James let out a huge scream.

The Los Angeles Lakers are on the cusp of what they want most — the franchise's first championship in 10 years.

Davis’ 3-pointer with 39.5 seconds left was the backbreaker, James finished with 28 points, 12 rebounds and eight assists, and the Lakers beat the Miami Heat 102-96 in Game 4 of the NBA Finals on Tuesday night.

The Lakers lead 3-1 and can win the title when the series resumes Friday.

Kentavious Caldwell-Pope scored 15 and Danny Green added 10 for the Lakers, who didn’t trail at any point in the final 20-plus minutes. Davis’ 3-pointer in the final minute made it 100-91, starting the celebration that took the Lakers all night to earn.

“Felt like a finals game," James said. “Felt like both teams were desperate ... and that's what it's all about."

Jimmy Butler scored 22 points for Miami, which got 21 from Tyler Herro, 17 from Duncan Robinson and 15 from Bam Adebayo — who returned after missing two games with a neck injury.

James’ 3-pointer with 8:18 left in the third put the Lakers up 55-54 and set the tone for the way the rest of the night was going to go; L.A. leading, Miami chasing.

The Lakers were up by seven with 2:27 left in the third after a 3-pointer by Davis — the 71-64 margin representing the biggest by either side to that point. Miami scored the next six to get within one, yet couldn’t get back on top, a trend that persisted into the fourth.

Herro made a 3 early in the fourth to get Miami within one again; the Heat promptly fouled Markieff Morris on a 3-point try, and he made all three shots. Butler scored inside to tie the game with 6:27 left; James scored the next five points himself, including a three-point play where he ended up flat on his back after spinning the ball perfectly off the glass for a score on a drive while taking contact.

A bounce here, a bounce there. Those were the differences late, and the Lakers made their own breaks.

Butler had a corner 3 that would have given Miami the lead rim out with 3:05 left; Caldwell-Pope made a corner 3 at the other end seven seconds later and the Lakers were up 93-88. Miami then turned the ball over on a shot-clock violation; Caldwell-Pope scored on a drive for a seven-point lead.

“The job is not done," James said.

Not yet. But they're on the brink.

TIP-INS

Lakers: Dwight Howard nearly collided with NBA Commissioner Adam Silver while leading the Lakers out of the locker room for pregame warmups. ... The Lakers were 14 for 39 on 3-pointers, making them 59 for 166 in the series. Before this year, the Lakers’ record for 3s in a finals were 43 made and 125 attempts — both of which were surpassed this year in the first three games.

Heat: Point guard Goran Dragic (torn left plantar fascia) went through an on-court workout before the game with hopes of being able to play for the first time since the first half of Game 1, but was ruled out again shortly afterward. ... Robinson’s first 3-pointer Tuesday was his 50th of the playoffs, meaning he and Jae Crowder are the first duo in Heat history with 50 post-season 3s apiece. They’re the fourth teammates in NBA history to pull off that feat.

3-1 LEADS

This is the 36th time that a team has held a 3-1 lead in the NBA Finals. Of the previous 35, the team with the lead has gone on to win the title 34 times — James and the Cleveland Cavaliers in 2016 becoming the exception when they won three straight games to defeat Golden State.

In the 3-1 Finals situation, the series has ended in five games 51.4% of the time (18 instances), in six games 40% of the time (14 instances) and in seven games 8.6% of the time (three instances).

RARE HALF

The Lakers led 49-47 at halftime. It was just the third time in the last 26 NBA Finals games that neither team reached 50 points in the first 24 minutes. Tuesday’s was the 1,140th game played this season and just the 35th occurrence of both teams scoring 49 or less by the break, which works out to 3.1% of the time.

___

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP_Sports