MIAMI HEAT’S Mike Miller (13) looks to pass as Boston Celtics’ Kevin Garnett (5) defends during the first half of Game 5 in their NBA basketball Eastern Conference finals playoffs series on Tuesday in Miami.

MIAMI HEAT’S Mike Miller (13) looks to pass as Boston Celtics’ Kevin Garnett (5) defends during the first half of Game 5 in their NBA basketball Eastern Conference finals playoffs series on Tuesday in Miami.

When the Boston Celtics last left Miami, they were on the ropes. Down 2-0 in the Eastern Conference finals. Unable to solve LeBron James and Dwyane Wade. On the cusp of being ousted by the Heat for a second straight season.

Three games and three wins later, the plot could not be more different as they sauntered out of Miami this time.

And for one of sports’ most storied franchises, yet another trip to the NBA finals might be looming.

Kevin Garnett finished with 26 points and 11 rebounds, Paul Pierce scored 19 — including a huge 3-pointer over James’ outstretched arm with 52.9 seconds left — and the Celtics beat the Heat 94-90 on Tuesday night, stealing home-court advantage and taking a 3-2 lead in the East finals that now shift to Boston for Game 6 on Thursday night.

“This is like a heavyweight bout,” Garnett said.

If so, it’s the Celtics who have fought their way off the ropes.

They trailed by 13 in the second quarter, by nine in the third, by six with 6 minutes left to play. And every time, they answered — a 22-11 run to close the half, a 15-1 run to end the third and a 22-12 run to end the game. A trio of comebacks, a trio of wins, and a chance to oust Miami’s Big Three one round earlier than the Heat ever imagined.

“We’ve done nothing,” Celtics coach Doc Rivers said. “We’re playing a heck of a basketball team. So just because we’re going to Boston, I told them, we have to play. They’re not going to give it to us. We have to go get it.”

James finished with 30 points and 13 rebounds for Miami, though he went eight minutes without scoring in the final quarter. Wade scored 27 for the Heat, who got no more than nine from anyone else, even with Chris Bosh returning to the lineup after missing nine games with a strained lower abdominal muscle. Bosh gritted his way through 14 minutes, scoring nine points and grabbing seven rebounds.

Pierce’s 3 put Boston up 90-86. Miami got within two points twice, and argued that it should have had a steal with 8.8 seconds left. Instead, a foul was called on Udonis Haslem, Garnett made two free throws, and the Celtics knew they had just stolen one on Miami’s home floor.

Now all they need is one home win of their own to clinch a trip to either Oklahoma City or San Antonio for Game 1 of the NBA finals. The title series starts June 12.

“Right now,” Celtics guard Ray Allen said, “the next game is Game 7.”

Allen and Mickael Pietrus scored 13 apiece for the Celtics, who got 10 from Brandon Bass. Pietrus hit two huge 3- pointers in the fourth quarter for Boston, which remained perfect with this core when facing maybe the most pivotal situation a best-of-seven can offer — a Game 5 with a series tied 2-2.

Pierce, Garnett, Rajon Rondo and Ray Allen are now 9-0 in that scenario.

So Game 5s are magical for Boston. Sometimes, they are for James as well.

And sometimes — this one included — they’re not.

James’ most memorable moments have come in Game 5s, like the epic 48 points where he just carried Cleveland on every possession down the stretch at Detroit in 2007, and the 120- 88 loss to the Celtics in 2010, his last home game with the Cavaliers.

This one offered more theater, of course. James hit a 3-pointer to give Miami a two-point lead with 8:10 left, closed out on Pierce to force an airball on the next possession, and eventually Miami pushed the margin out to 78-72 on a layup by Wade with 6:17 to play. On that play, James looked gassed, gasping for air as he stood near the baseline.

Boston needed breaks down the stretch, and got them.

The Celtics’ end-of-game run started with, of all things, a magnificent defensive play by Wade, who blocked Bass’ dunk attempt with 6:03 left. The ball wound up going to Pietrus, who drilled a 3-pointer, and made another off a scramble about four minutes later to give Boston an 85-83 lead.

Comments are not available on this story.