When the Oklahoma City Thunder looks back on Game 3 of the NBA Finals, it probably will find a litany of careless plays and unforced errors that contributed to a wasted opportunity to regain home-court advantage — sloppy passes, missed free throws, silly fouls.

The Miami Heat will reflect on the moments when it seized control of a 91-85 victory on Sunday night that required the relentless attack of LeBron James and Dwyane Wade, and the determination to overcome a poor shooting performance at American Airlines Arena.

The third game was the least aesthetically pleasing of a hotly contested series between an exuberant, young Thunder team whose play sometimes borders on wild and a slightly-more experienced Heat that continues to leap over its mental hurdles of the past.

Both teams can easily feel that better basketball is in store, but the Heat is up two games to one because it made more plays — battling back from a 10-point third-quarter deficit — and the Thunder fumbled until the very end.

“It’s not saying that we want it more, I just feel like we understand situations more. We can deal with it better,” Wade said after scoring 25 points. “We come from the Finals last year to this year; experience is not overrated at all. That helped us win the ballgame. We kept grinding and kept grinding.”

James scored a game-high 29 points, including eight in the fourth quarter, and provided what would be the decisive points with 2 minutes 18 seconds remaining. He drove down the left side of the lane, twisted his body and flipped a shot over his head and off the glass to give Miami an 86-79 lead.

Oklahoma City needed only 48 seconds to get back within one point, as Kendrick Perkins made two free throws, Thabo Sefolosha stole the ball from Wade and flipped the ball over his head and into the basket, and Russell Westbrook buried a 17-foot jumper.

But almost as quickly as the Thunder got back in the game, it folded.

Kevin Durant missed a short jumper, Westbrook missed a three-pointer and Sefolosha threw a pass out of bounds after a miscommunication with Westbrook.

“A couple mental mistakes,” reserve James Harden said. “We can’t let that happen, especially in cruch time like that. In the fourth quarter, we had a couple of turnovers, a couple of missed shots, a couple of defensive mess-ups, but we gave it a good battle. We’ve let two [games] get away, the last two get away.”

Miami pulled away from the foul line: It made up for shooting just 37.8 percent from the field by making 31 of 35 free throws, including 22 of 24 in the second half.

A team that has dealt with the disappointment of failing in the NBA Finals last season has found a way to win.

“Every day we remind ourselves, we think of that pain that we experienced last year. And it really doesn’t matter how you shoot the ball,” Heat forward Chris Bosh said. “On defense, we have to play solid. You have to have that energy, and sometimes you’re going to be tired. But it hurts a lot worse when you’re not successful. We carry that pain with us. That really helps us succeed in this series.”

Durant led the Thunder with 25 points but James helped limit him to just four points in the fourth quarter.

Durant scored eight points during a 14-2 third-quarter run. He rebounded a Sefolosha missed layup and dunked with two hands, then went around James with relative ease to make a runner off the glass that put the Thunder ahead 60-51. But he was unable to keep rolling because he was forced to sit with 5:41 left in the third period after picking up his fourth foul while defending Wade.

Wade made a free throw to bring the Heat within six, and Thunder Coach Scott Brooks benched Westbrook after he plowed into Shane Battier and was called for an offensive foul.

With Durant and Westbrook sitting, the Thunder was able to extend the lead to 10 when veteran reserve Derek Fisher was fouled on a three-pointer and converted a four-point play.

Then Oklahoma City collapsed with two defensive breakdowns. Serge Ibaka fouled Battier as he attempted a three-pointer, then Fisher fouled reserve James Jones on a three-pointer, giving the Heat six points from the foul line as the team was struggling to convert shots from the field.

“Things are going to happen like that throughout a game,” said Westbrook, who finished with 19 points. “You’ve just got to be able to stick together and find a way where you can stop whatever is going on.”

Miami missed 10 of 14 shots in the third period but scored the last seven points of it to lead 69-67 after James buried a three-pointer from the left corner. The Thunder didn’t help itself by missing five free throws with Westbrook and Durant watching from the bench.

“It’s coach’s decision. You live with it,” Westbrook said.

“I hate sitting on the bench, especially with fouls,” said Durant, who played with foul trouble for the second game in a row. “I had a nice rhythm going on the offensive end, and for it to just stop like that by me going out of the game because of fouls is kind of tough.”

The Thunder led 77-76 when Harden made a driving layup, but the Heat scored the next eight point points, getting three-point plays from Wade and James on consecutive possessions.

“I just tried to make plays,” James said. “Last year, I didn’t make enough game-changing plays, and that’s what I kind of pride myself on. I didn’t do that last year in the Finals. I’m just trying to make game-changing plays, and whatever it takes for our team to win. Just trying to step up in key moments and be there for my teammates.”