On a long night that started with a two-hour rain delay, Cody Stubbs singled with the bases loaded to bring home the winning run and help the tournament's overall top seed advance to the super regionals.
Stubbs' hit down the left-field line scored Landon Lassiter from third base to cap a game filled with momentum swings, sending the Tar Heels (55-9) spilling onto the field in a mad dash to celebrate.
"I was going to get the job done no matter what," said Stubbs, the regional MVP. "I was mad at myself. I had chased a couple of bad pitches. But there was no way I wasn't going to put the ball in play right there. I told myself, 'No matter what, you're putting the ball in play.'"
His teammates mobbed him as he rounded first base, a moment steeped in relief as much as it was exuberance in a game that ended after 1 a.m. Tuesday.
UNC took a 6-2 lead into the ninth inning, but gave up six runs -including a grand slam by Tyler Rocklein - to trail 8-6. But the Tar Heels tied it to send it to extras, but fell behind again in the 12th after the second-seeded Owls (42-22) got a three-run homer by Levi Meyer - who was 0 for 5 before that hit - in the top of the inning.
The Tar Heels came back yet again, and then won it to advance to the best-of-three super regionals against South Carolina, starting Friday at Chapel Hill.
North Carolina narrowly avoided joining Oregon - No. 8 overall - as national seeds to fail to get out of the regional round. And it was a tough fight throughout the weekend, with the Tar Heels earning its three wins by a combined seven runs.
They didn't pitch particularly well. They left way too many runners on base and had at least three thrown out at home, including Stubbs for what would've been the winning run in the 12th.
The win came barely a week after North Carolina needed 18 innings to beat rival North Carolina State in the Atlantic Coast Conference tournament.
"Our team's toughened up," Fox said. "Over the last two to three weeks, we've had to. We played some really good teams in this regional. We also played against ourselves, I think, a little bit during this regional. So I'm proud of the guys for fighting through and getting it done. This is unbelievable."
The Tar Heels started the year 39-2 and won the ACC tournament title, but just avoided suffering consecutive losses for the first time all season. Florida Atlantic edged North Carolina 3-2 on Sunday to force Monday night's decisive game.
On this night, the Tar Heels used six pitchers - including regional-game starters Kent Emanuel, Benton Moss and Hobbs Johnson - before reliever Reilly Hovis (4-0) earned the win by striking out Rocklein to end the top of the 13th.
Reliever Michael Sylvestri (4-3) took the loss after allowing three hits and the winning run in 1 1/3 innings.
Florida Atlantic was trying to reach the super regionals for the first time since 2002.
"They kept battling back and battling back," Owls coach John McCormack said. "They made pitches when they had to and got big hits. Congratulations to them. It was an unbelievable game, something I don't know if this stadium has ever seen or might ever see again. It's just a shame we're on the short end of it."