Miami’s BankUnited Center has been a scene of futility for Maryland since the 7,200-seat arena opened in 2003.

Wednesday, it was a scene of wild controversy, hapless first-half shooting and a spirited comeback that fell short, with the Terrapins falling in double overtime, 90-86.

Missing his team’s grittiest effort of the season was Maryland Coach Mark Turgeon. He was ejected with more than seven minutes to play in regulation after drawing two quick technical fouls for an eruption over a charge on freshman Nick Faust.

Sophomore Terrell Stoglin overcame a miserable first half to hit the three-pointer that forced overtime and finished with a game-high 33 points. Center Alex Len was the only other Terp to manage double-figures (11 points).

Turgeon apologized afterward for getting ejected. But his ouster galvanized the Terps; they roared to life afterward, slashing what had been a 16-point deficit to force overtime and hanging in until the tough-nosed Hurricanes capitalized on one turnover too many.

It was Maryland’s fourth defeat in its last five games and sends the Terps into Saturday’s meeting with No. 5 North Carolina without the momentum they hoped for, now 13-8 overall and 3-4 in ACC play.

“I’m proud of them,” Turgeon said, referring to his players and assistant coach Scott Spinelli, who took over in his absence. “I wish we got over the hump. It would have been a great win for us; it would have been that next step for us.”

With Miami’s hot-shooting forward Kenny Kadji out with a head injury and Coach Jim Larranaga stricken by the flu, it seemed that Wednesday could mark a turnaround for Maryland, which had never won at BankUnited Center.

The lead rocked back and forth early. But Maryland’s shooting went from mediocre to poor, with Stoglin and Sean Mosley hitting just three of their 14 shots in the first half.

A dunk by Mychal Parker put Maryland up 22-20 with 5 minutes 7 seconds left in the period. But Miami (13-7, 4-3) went on a 10-0 run to take a 34-23 lead at the break.

Spinelli said that Turgeon ripped into his team for the lackluster play at halftime.

Maryland came out with new fire in the second half. Stoglin found Len for an alley-oop. Then the center struck again to pare the deficit to five, 38-33. Turgeon was sent off soon after. Spinelli said he tried holding the coach back before the second outburst but couldn’t reach him in time. Turgeon made his point, nonetheless.

“He was just trying to send a message to our guys,” said Spinelli, who has coached under Turgeon for six years. “He’s a fighter. He’s very passionate about his players and wants to teach life lessons: ‘If [you’re] not going to put forth the effort, I’m willing to sacrifice.’ . . . Coach did it for a great purpose, to be honest. He wasn’t hot-headed.”

Maryland scrapped even harder under Spinelli.

“Everyone was playing inspired,” said Mosley, who finished with seven points and nine rebounds. “Everybody was trying to win for coach.”

Maryland slashed its 16-point deficit to pull even on a three-pointer by Stoglin with 57 seconds to play. Stoglin’s final attempt to win in regulation clanged off the rim.

Pe’Shon Howard sank the free-throws that knotted the score at 76 at the end of the first overtime.

By then Miami’s top scorer, Durand Scott (24 points), had fouled out. But the Hurricanes pulled away nonetheless.