Updated

Gio Bernard returned a punt 74 yards for the go-ahead touchdown with 13 seconds left, helping North Carolina stun rival North Carolina State 43-35 to end a five-year losing streak in the series.

Bernard's punt return capped a huge day for the sophomore tailback, who ran for 135 yards and two touchdowns. He also had eight catches for 95 yards to lead the Tar Heels (6-3, 3-2 Atlantic Coast Conference), who trailed 35-25 entering the final period in a back-and-forth game that lived up to the rivalry hype.

North Carolina hadn't beaten the Wolfpack (5-3, 2-2) since Tom O'Brien took over in Raleigh in 2007, but finally halted that skid under first-year coach Larry Fedora.

Mike Glennon threw for a career-high 467 yards and five touchdowns to lead N.C. State, which led 35-25 on Glennon's 55-yard pass to Bryan Underwood with 39 seconds left in the third quarter.

N.C. State entered the afternoon with two straight wins — including an upset of then-No. 3 Florida State on Oct. 6 — that had put the Wolfpack in control of its own destiny in the ACC's Atlantic Division. Instead, the Tar Heels, who are banned from a bowl for NCAA violations, knocked their rivals back in the league race with a stunning finish after blowing their own big lead.

After leading 25-7 late in the first quarter, the Tar Heels tied the game at 35 on Casey Barth's 34-yard field goal with 1:24 left, then forced the Wolfpack to punt with about 30 seconds left. Bernard — who had injured his right ankle on a catch early in the second half — fielded the punt inside his own 30, then started running to his right where his blockers had set up a wall. Bernard broke free down the right sideline in front of the Wolfpack bench, scampering into the end zone to set up off a wild celebration in Kenan Stadium's blue-filled end zone.

UNC punter Tommy Hibbard then managed to complete his second two-point conversion pass of the day to Jack Tabb to push the lead to 43-35. And when Tobais Palmer fumbled the ensuing kickoff, the Tar Heels were finally in position to celebrate.

Bryn Renner took a knee to end it, and the UNC players soon started jumping into the front row of the student section near the tunnel to celebrate before heading into the locker room.

Renner threw for 358 yards and a touchdown, while Erik Highsmith also ran for a touchdown on a 45-yard reverse on UNC's second possession.

Bryan Underwood had six catches for 118 yards and two touchdowns for the Wolfpack, who held the Tar Heels scoreless from late in the first quarter until Renner's 3-yard scoring toss to Sean Tapley made it 35-32 with 10:23 left in the game.