MIAMI — The 76ers appeared to be on the way to a thrilling victory at AmericanAirlines Arena. Then the final 18 seconds of regulation were played.

Tobias Harris’ missed dunk followed by Joel Embiid’s huge turnover and more miscues led to a 117-116 overtime loss to the Miami Heat on Saturday.

“To do a lot of good things,” coach Brett Brown said, “and then just at the end, make some plays you wished you had back, makes it difficult to swallow.”

So instead of celebrating a much-needed road win, the Sixers are a team searching for answers after the loss.

The defeat dropped them to 23-12. It also marked their second head-scratching road loss in as many days after defeating the league’s top-ranked Milwaukee Bucks on Christmas Day at home.

The Sixers are now 7-10 on the road and things aren’t about to get easier. Their next two games are on the road against the 21-12 Indiana Pacers on Tuesday and the Houston Rockets on Friday. The Rockets were 22-10 heading into Sunday’s game against the New Orleans Pelicans.

“There were some plays throughout the game that I wish we had back,” Josh Richardson said of the loss in Miami.

Things started to unravel with the Sixers’ up 106-104 with 18 seconds left. That’s when Harris missed a dunk. Embiid ended up with the ball after Ben Simmons grabbed the offensive rebound with 15.7 seconds remaining.

Instead of passing to one of his wide-open teammates, Embiid held onto the ball, looking to get fouled.

As Heat players swarmed around him, Embiid was stripped by Jimmy Butler with 10.1 seconds left. That led to Tyler Herro’s three-pointer to put Miami up, 107-106, with 6.9 seconds remaining.

The Sixers managed to force overtime after a heads-up play by Simmons.

With his team trailing 108-106 with one second left, Richardson missed the first of two foul shot. Then he intentionally missed the second one. The shot hit the backboard and skimmed the rim, allowing Simmons to rebound the miss and score the put-back to knot the score at 108 with .6 seconds, left forcing overtime.

Then Sixers were able to overcome two costly turnovers thanks to Simmons’ game-tying alley-oop dunk to knot the score at 116 with 18.3 ticks left.

But the Heat immediately called a timeout and subbed in Herro for Chester’s Derrick Jones Jr. and Duncan Robinson for Myles Leonard. At the same time, the Sixers replaced Trey Burke with Al Horford.

Butler drew a foul on Horford while trying to make a move to the basket with 2.3 seconds left. Butler made 1 of 2 foul shots to go give the Heat a one-point lead. Miami escaped with the win after Harris missed a 23-foot corner three-pointer with 0.7 seconds remaining.

So what stings the most about this loss?

“I’d probably have to go back and look at it, honestly,” Simmons following the game. "But finishing out the game, and how everybody’s feeling now, obviously we are disappointed.

“There’s a lot of things we’ve got to work on as a team. Just really watch film.”

Embiid initially said he didn’t know the biggest thing the Sixers need to overcome before adding, “Just stay together and keep fighting."

“Last night [a 98-97 road loss to the Orlando Magic] wasn’t a good game and [Saturday] was a tough one,” he added. They are obviously a good team. We just have to be better."