Photo: Miami Heat/X

The Miami Heat are currently enduring their longest losing streak in nearly two decades, a painful stretch that extended to nine consecutive defeats following a heartbreaking 116-113 loss to the Detroit Pistons on Wednesday.

Cade Cunningham sealed Miami’s fate with a dramatic, banked three-pointer just before the final buzzer, snatching victory away from a Heat team that had controlled much of the game.

“There’s no way to explain some of this, the bank shot at the end,” head coach Erik Spoelstra admitted in the aftermath of yet another gut-wrenching defeat.

“There’s no way to explain that. You just have to find more resolve. We’re all getting tested in so many different ways that we do not want to get tested.”

Despite their struggles, the Heat remain in the play-in mix, though their position has weakened considerably.

Now sitting in 10th place with a 29-40 record, Miami faces an uphill battle with a tough stretch of games ahead.

The challenge continues on Friday when they host the Houston Rockets, the Western Conference’s second-best team.

From there, a brief respite against the Hornets on Sunday precedes a highly anticipated showdown next Tuesday, when Jimmy Butler returns to the Kaseya Center to face his former team in a clash against the Golden State Warriors.