6-yard touchdown run on a sprint option to pull UNC within 10.
The Tar Heels then got field goals from Jeff Reed on their next two drives, a 33-yarder at the end of the first half and one from 21 yards to open the second.
They would have tied the game if James Walker had not broken up a sure touchdown pass to Bosley Allen on UNC's first drive of the third quarter.
"I definitely think we had the momentum when we came back," said tailback Brandon Russell, who rushed for a career-high 96 yards on 28 carries. "Getting down there close and almost scoring, coming back and getting so close to tying the game up was a big plus for us."
UNC had a chance to expand on that momentum but couldn't do it. N.C. State's Kent Passingham missed a
24-yard field goal with 12:10 remaining in the game, giving the Tar Heels a chance to grab the lead.
But on UNC's first play from scrimmage, Curry fumbled after he was sacked from behind by Shane Riggs. Dantonio Burnette recovered on the UNC 15. Two plays later Cotra Jackson, filling in for the injured Ray Robinson, scored to put the Wolfpack (5-1, 2-1) ahead 31-20.
"You hit him, and you just kind of swipe it all in one motion," said Riggs, who came around the end to hit Curry from the blind side. "I was just lucky enough that it did pop out."
Jackson's touchdown would not be his last. Jackson, who racked up 94 yards on 13 carries in the fourth quarter, iced the game with a 3-yard TD run with 49 seconds left. Robinson had amassed 110 yards on 23 carries before going out with a sprained foot.
The N.C. State offense, averaging 75.2 yards per game on the ground coming in, finished with 171 rushing yards.
"They put our defense in the pass mode," UNC defensive tackle Ryan Sims said. "They come out and they throw the ball, and then they sneak a run in there. When you've got your pass rush on, those runs will kill you."
But the run defense was only part of the problem. For the second game in a row, the UNC special teams failed in punting situations.
To get the day's news and headlines in your inbox each morning, sign up for our email newsletters.
There was Marcus Jones jumping offside late in the fourth quarter on fourth-and-two to give N.C. State a first down that ultimately turned into its final touchdown.
There was the kick-catch interference call in the third quarter against Dexter Reid that negated a roughing-the-punter penalty against the Wolfpack.
There was the personal foul in the second quarter that negated a block-in-the-back call against N.C. State. Koren Robinson returned the ensuing punt 36 yards to set up the Wolfpack's third touchdown, a 2-yard run by Ray Robinson.
There was also the unsuccessful fake in the second quarter that resulted in punter John Lafferty being tackled for a 12-yard loss. The Wolfpack took over on the UNC 27 and scored three plays later, when Rivers found wideout Bryan Peterson for a 10-yard score and a 17-7 lead.
The various mistakes gave the Wolfpack a short field to travel all day long. N.C. State's first five scoring drives averaged just 35.6 yards in length.
"It's really tough on the defense when the special teams mess up," UNC linebacker Sedrick Hodge said. "We're taught not to worry about their mistakes and just play for the next play, and that's what we have to do."
Rivers and Peterson hooked up in a different way to give the Wolfpack a 7-0 lead on its first drive. Koren Robinson took a handoff from Rivers on an end around and pitched it back to Peterson, a former high school quarterback. Peterson then threw to a wide-open Rivers for a 19-yard touchdown.
The Tar Heels never really could respond with any big plays of their own. Allen lost 8 yards when he tried to run on a reverse, and UNC completed just two passes of more than 15 yards.
It wasn't exactly what offensive coordinator Mike O'Cain, who was fired as N.C. State's head coach last year, had in mind for his first meeting with his former players.
"It was not a fun game for me at all," O'Cain said. "There's a lot of players over there who I care an awful lot about. It was very difficult. But at the same time, it's a lot worse afterward when you just don't feel like you played as well as you could have played on the offensive side of the ball."
The Sports Editor can be reached at firstname.lastname@example.org.