Miami fans who left early from Tuesday night’s Game 6 of the NBA final were pounding the doors to get back into the arena as the Heat came back in a stunning overtime win over the San Antonio Spurs.

Police even had to be called to control the crowd when they were turned away.

With the Spurs up five in the last minute, hundreds of Heat fans began heading for the exits at the American Airlines Arena.

Arena security officials brought out the yellow rope to hold back fans in anticipation of the Spurs’ on-court championship trophy presentation. But then LeBron James and Ray Allen hit a pair of 3-pointers to force overtime, and eventually, a 103-100 win.

Game 7 is Thursday in Miami.

“I feel so bad. I thought it was over,” Marcella Tabora, who left the game early with her husband, Tyson and the couple’s young daughter, told the Florida Sun-Sentinel.

“We have a long drive to West Palm Beach, so I said ‘Let’s go.’ We were walking (outside) and he checked his phone and saw it was 95-95, so we came back. But they said we couldn’t go back inside.”

Other fans were banging on the doors, begging to be let back inside. Eventually, police officers were called in to help diffuse the situation.

“Cops finally here. Fans still pounding on the doors begging to be let in,” tweeted Victor Oquendo of WPLG Local 10. “Most pathetic display I’ve ever seen here.”