The Heat’s offense is a mess, so it needs to keep turning defense into offense in Game 6

Offense has never been easy to come by for the Miami Heat this year and Game 5 of the Eastern Conference finals Wednesday was the best — or worst, depending on the perspective — example yet.

The Heat missed 38 three-pointers, scored just 59.8 points per 100 possessions in the halfcourt and lost 92-80 to the Boston Celtics at FTX Arena in Miami, sending the Heat to the brink of elimination.

Heat one loss away from elimination, as offensive struggles continue in Game 5 loss to Celtics

Still, Miami actually led at halftime until — as has often been the case in this these East finals — the Celtics used one big quarter to pull away and take a 3-2 series lead. The recipe for success was finding extra possessions and the Heat is going to have to do the same thing in Game 6 on Friday at TD Garden Arena in Boston if it’s going to keep its season alive.

“Defensively, we did enough, certainly, in a playoff game to put ourselves in a position to win,” coach Erik Spoelstra said Wednesday. “I don’t know if it’s realistic to hold them to 79. In the playoffs if you’re holding them to 93, you think that — hold them under 100, you have a great chance to win at home.”

Miami’s offense will almost certainly be better this weekend, but there’s still probably a ceiling on it, given the injuries to point guard Kyle Lowry and All-Star forward Jimmy Butler.

For the Heat to manufacture the sort of offense it probably needs to beat the Celtics, it needs to either get hot from three-point range — a possibility, given its spot as the NBA’s top three-point shooting team in the regular season — or find a way to create extra possessions.

The latter has been Miami’s most reliable source of offense in these conference finals.

In Game 3, the Heat played the entire second half without Butler, and won in Boston because it coaxed the Celtics into 23 turnovers and scored 33 points off them.

In the first half of Game 5, Miami got just seven points from Butler, and took a 42-37 lead into halftime because it attempted 14 more shots than Boston by grabbing nine offensive rebounds and forcing the Celtics into 10 turnovers.

“We had too many turnovers,” All-NBA forward Jayson Tatum said Wednesday.

Added Boston post player Al Horford: “I think that was the biggest thing.”

With those 10 turnovers, the Heat scored 12 points and it added another 16 with second-chance points — 26 of its 42 first-half points came from turnovers and second chances.

In the second half, Miami still had 10 offensive rebounds, but only converted them into eight points and Boston cut its turnovers in half down to five, giving up just five points off them.

Jaylen Brown committed four of Boston’s 15 turnovers — he has 15 so far in this series — and all four happened in the first half. After one of those first-half turnovers, Ime Udoka pulled his star wing aside to make his ball security a point of emphasis.

“You’re acting like you’re surprised that they’re reaching and poking him from behind. It wasn’t as much like live-ball turnovers, trying to make a nice pass. It was literally getting taken from us. Be strong with the ball,” the Celtics coach said Wednesday. “Five games in now, we’re having too many of these type of turnovers, not being strong with the ball in the crowd. He understood that. ... We talked about it at halftime.”

If Boston has cleaned up its turnover problem for good, the Heat’s offense will be in even more trouble as it heads Massachusetts for a must-win game.

Miami, however, forced the second most turnovers in the league in the regular season. The Heat will have a response, too.

“Miami does a good job of slapping down, and reaching and grabbing, making it tough for you,” Brown said Wednesday. “It’s a little bit of both. I’ve got to do a better job, for sure, but, overall as a team, we’ve got to do a better job, too.”