Tyler Ennis and the Syracuse bench erupt after his game-winning three-pointer. (Charles LeClaire / USA Today)

The outcome was in doubt until the last possible nanosecond, but Syracuse managed to remain undefeated with a miraculous buzzer-beater by Tyler Ennis on Wednesday night.

After making two free throws with 10.8 seconds left, the freshman sank the game-winner from way, way downtown, giving the Orange a 58-56 victory over Pitt and running Syracuse’s record to 24-0.

“I saw someone ran over to Trevor [Cooney],” Ennis said, “and I just had to beat one guy. I knew they weren’t going to let Trevor get it. I just had to get some space. I knew I could get open for a second.”

That was all it took.

“He had his worst game tonight all year,” Syracuse Coach Jim Boeheim said of Ennis, who finished with 13 points. “… You gotta be a little lucky, and that was a little lucky, but you still gotta shoot it.”