Jimmy Butler scored 40 points to lead the Miami Heat to a win in Game 3 of the NBA Finals. (Douglas P. DeFelice/Getty Images)

KISSIMMEE, Fla. — Jimmy Butler has repeated a simple mantra all week: The heavily favored Los Angeles Lakers were beatable if the Miami Heat could “play perfect.”

The sentiment started to feel like wishful thinking once the Lakers staked a commanding series lead in the NBA Finals with a pair of blowout victories. But it turns out the Heat only needed to perform very well to claim its first win of the series, as long as the Lakers bumbled through their most disjointed showing of the playoffs.

After being badly outclassed and losing Bam Adebayo and Goran Dragic to injuries in the first two games, the Heat rebounded to take advantage of the Lakers’ woes with a 115-104 victory in Game 3 on Sunday. Butler led the way with 40 points, 11 rebounds and 13 assists, tying his postseason career high for scoring and turning in the best all-around playoff game of his career.

There was little flash to the Heat’s performance. Butler bulldozed his way to the basket to grind out tough offense, and center Kelly Olynyk hit three three-pointers to score 17 points off the bench on a night when both offenses went cold from outside. Defensively, Miami capitalized on Los Angeles’s 20 turnovers and counterpunched effectively to ward off a Lakers run early in the fourth quarter.

Game 3 produced the first moments of real tension in these Finals: LeBron James warned Butler that the Heat was “in trouble” at the end of the first quarter, and Butler returned the barb late in the game.

“LeBron has got the best of me way too many times,” Butler said, referring to past playoff losses to James’s teams in 2013 and 2015. “I respect the guy for it, but this is a different time now and a different group of guys around me. We’re here to win. We’re here to win. We’re not going to lay down. We’re going to fight back in this thing and even it up 2-2.”

Miami raced out to a 22-9 lead and opened a 14-point spread midway through the third quarter. The first quarter in particular was a comedy of errors for the Lakers, who committed 10 turnovers in the first 12 minutes, lost Anthony Davis to foul trouble and scored just 23 points, their lowest first-quarter total during this playoff run. James was out of sync, throwing casual passes into traffic and out of bounds. Davis was worse, committing four turnovers and failing to score or even attempt a shot until early in the second quarter.

The Heat would have won going away if not for the Lakers’ bench, which bought time for its superstar duo. Reserve forwards Markieff Morris and Kyle Kuzma provided stability to a disorganized offense, hitting two three-pointers each before halftime. Morris provided another key jolt early in the fourth, hitting consecutive three-pointers to briefly tie the score at 89 with 9:30 to play.

But even when they built momentum, the Lakers couldn’t stay out of their own way. Signs of frustration from the Lakers were everywhere: James and Davis exchanged glances early, and both stars lobbied the referees for foul calls to no avail down the stretch. James, who tossed away a pass with less than three minutes to go and the Lakers down by eight, finished with 25 points, 10 rebounds and eight assists, but his eight turnovers tied a season high for the regular season and playoffs.

“Being the starting point guard of the team, having five first-half turnovers and eight for the game, I can’t do that, obviously,” James said. “You just can’t turn the ball over against that team, and I’ll take full responsibility for that.”

Davis truly had a night to forget, picking up two early fouls in the first quarter, a third foul midway through the second quarter and his fourth foul just two minutes into the second half. The all-star forward, who had been a leading Finals MVP candidate heading into Game 3, never fully got on track, finishing with 15 points, five rebounds and five turnovers in what was his shakiest performance of the playoffs. The Lakers were outscored by 26 points in Davis’s 33 minutes on the court.

“[Foul trouble] takes away the aggressiveness on both ends of the floor that I’m used to playing with,” Davis said. “Still got to be better and still got to find ways to affect the game, but it definitely took me out and put a little bit too much pressure on the other guys.”

Davis sounded more annoyed than worried, saying that the Lakers “will be fine” because “it’s one loss [and] we’re still up in the series.” James agreed, knowing that the Lakers are 3-0 after losses during the playoffs.

“I don’t feel like we’re concerned,” James said dismissively after he had walked off the court in frustration shortly before the final buzzer. “We’re not concerned. We know we can play a lot better. We have another opportunity to take a commanding lead on Tuesday. You relish that.”

As chaos reigned for the Lakers, Butler kept chipping away. The all-star forward showed no signs of the sprained ankle he suffered in Game 1, and he crashed to the court repeatedly on harrowing drives through traffic. The Heat needed everything it got from Butler, who arrived from the Philadelphia 76ers last offseason in a sign-and-trade. He was Miami’s primary source of offense down the stretch, scoring 10 points in the fourth quarter by barreling to the basket and methodically backing down defenders for turnaround jumpers. Miami left plenty on the table offensively, with starting guards Tyler Herro and Duncan Robinson both looking tentative at times and struggling to convert open shots that could have provided greater breathing room.

“Dwyane [Wade] swore to us, he looked [Heat President] Pat [Riley] and I dead in the eye and said, ‘[Butler] is your guy’,” Spoelstra said, recalling Wade’s active role in recruiting his former Chicago Bulls teammate to Miami. “This is the next guy.”

Miami avoided what had seemed like an inevitable sweep and set itself up with a chance to even the series Tuesday. The Heat also set up the possibility that Adebayo, who suffered a neck strain in Game 1, could get back on the court to provide a better matchup against Davis and the Lakers’ front line. Butler hinted about a possible return to reporters, saying the Heat’s defense would “be even better whenever we get Bam back.” Adebayo got in a pregame workout before Game 3 but sat out for the second straight game as the Heat took a cautious approach.

With the final seconds ticking off, an exhausted Butler showed no expression, walking with his hands on his hips to the sideline. It hadn’t been perfect, but it had been enough.

“We’re just settling down,” Butler said. “It’s a lot of bright lights and a big stage for just about everybody. We’re coming to realize that we belong here.”

Read more on the NBA:

Sign up for our weekly NBA newsletter to get the best basketball coverage in your inbox

2020 NBA Finals schedule and what you need to know

NBA players’ historic push to increase turnout started by getting each other to vote

Find highlights from Game 3 …