GREENVILLE, N.C. (AP) North Carolina State coach Dave Doeren watched from the sideline as the late field goal that could have topped his 13th-ranked team sailed wide of the uprights, then offered a fist pump that was far more restrained than jubilant.

The Wolfpack had survived - and that was about as positive as anyone clad in red could be about Saturday's 21-20 win at East Carolina that featured the Pirates missing two critical late kicks.

''I think they're probably more mad than I'm going to be at them right now,'' Doeren said of his players.

N.C. State went from up 14 in the third quarter to barely hanging on thanks to a pair of plays that weren't even in its control. The Pirates were in position to hand the Wolfpack a surprising loss when they got the ball back late down one, not to mention offer Owen Daffer a shot at redemption after he pulled a tying extra point wide left after Rahjai Harris' short touchdown run with 2:58 left.

Holton Ahlers' keeper set up a 41-yard field goal in the final seconds for Daffer in the season opener for each school. But he missed this one wide right with 5 seconds left, prompting many of the fans in the once-rowdy crowd to put their hands on their heads in disbelief.

Shyheim Battle emphatically waved that the kick was no good as Doeren offered that fist pump for the Wolfpack, yet the moment quickly looked more like relief after another bumpy trip to Greenville.

This time, at least, it all came in a win.

''It obviously wasn't pretty,'' Wolfpack quarterback Devin Leary said. ''It wasn't the way we expected it to be. It wasn't what we're capable of doing.''

Leary, the preseason Atlantic Coast Conference player of the year, threw for 211 yards and a touchdown, but he had a costly interception with about 5 minutes left that set up East Carolina's late touchdown drive. The Wolfpack also came up empty on six goal-line plays in the fourth quarter, first with a goal-line fumble by Jordan Houston and then with talented youngster Demie Sumo-Karngbaye getting stuffed four straight times to end another drive.

In fact, the difference - Daffer's misses aside - came on a blocked punt by Jasiah Provillon deep in ECU's end that Sean Brown recovered in the end zone late in the first quarter.

Ahlers threw for 255 yards and two touchdowns to lead East Carolina, which held the Wolfpack to 25 fourth-quarter yards.

''I know nobody outside of Greenville gave us much of a chance but those kids never doubted,'' ECU coach Mike Houston said. ''We should've won the ballgame.''

THE TAKEAWAY

N.C. State: Everything has been set up for the Wolfpack to make a big leap in Doeren's 10th season, from Leary's presence to the program matching its highest-ever preseason ranking in The Associated Press poll. N.C. State led 21-7 by halftime, only to see this one nearly end as another loss in a stadium where the Wolfpack had lost four of five meetings.

ECU: Houston's first three years had been a heavy rebuild of the ECU program, which has long had a reputation for thriving in matchups against power-conference schools at home backed by rowdy crowd. The Pirates kept hanging around before making a late move toward a big upset. That could provide confidence going forward for the American Athletic Conference program - or it could be a damaging blow considering how this one ended.

DEMIE'S PLAY

Sumo-Karngbaye ran for 79 yards and a score to lead the Wolfpack's ground game, offering a physical and thud-delivering presence.

That included a 22-yard run to the 1 early in the fourth that had him keeping his legs churning, either bouncing off or running through roughly a half-dozen purple jerseys in a performance Doeren said was a highlight for the Wolfpack.

THE FINAL KICK

The Pirates were out of timeouts on Ahlers' keeper, so they had to run Daffer and the field-goal team on from the sideline with the clock winding down. But the Wolfpack had injury issues and had to call a timeout with 9 seconds left, giving Daffer more time to line up the kick.

''He had just missed an extra point, so I thought he's probably in his head a little bit,'' Doeren said of his thoughts from the sideline.

Daffer had earned a scholarship after kicking a 54-yard field goal as time expired to beat Navy last year.

''He feels worse than anybody right now,'' Houston said. ''We've got to support him. And he's got to rebound from this. But it's a tough, tough pill to swallow.''

POLL IMPLICATIONS

N.C. State didn't look sharp in this one, and that could cost the Wolfpack with voters for the next AP Top 25.

UP NEXT

N.C. State: Charleston Southern of the Championship Subdivision visits the Wolfpack next Saturday.

ECU: The Pirates host Old Dominion - which beat Virginia Tech in its Friday opener - next Saturday.

---

Follow Aaron Beard on Twitter at https://twitter.com/aaronbeardap

---

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/AP-Top25

Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.