SYRACUSE, N.Y. (AP) Quarterback Eric Dungey said he thought he was getting complacent when Syracuse coach Dino Babers declined to name a starter before the biggest game of the season.

After a week of heated competition in practice with redshirt freshman Tommy DeVito, the hero in last week's double-overtime victory over North Carolina, the Orange senior got the nod on Saturday night against No. 22 North Carolina State and delivered big-time. Dungey threw for three touchdowns and ran for another, and Syracuse won 51-41 to become eligible for the postseason for the first time in five years.

''I think it is huge for this senior class,'' said Dungey, who finished 27 of 38 for 411 yards passing and rushed for 32 to reach 10,064 total yards for his career. ''We've been through a lot. This is a great win. Every win against a ranked opponent is big.''

Syracuse (6-2, 3-2 Atlantic Coast Conference) improved to 5-0 in the Carrier Dome, and it was only the Orange's second win in 12 games against the Wolfpack.

''It was a fabulous win,'' said Babers, who was 4-8 in each of his first two seasons with the Orange. ''For a team to have the opportunity to have a winning season, it's something I'll always be proud of.''

N.C. State (5-2, 2-2), which was coming off its first loss of the season, a 41-7 thrashing at No. 2 Clemson, fell behind early, rallied, then ran out of time at the end. Orange linebacker Andrew Armstrong sealed the victory with an interception at the Wolfpack 23-yard line with 2:18 left, the only turnover of the game.

''For us to get that turnover was the difference,'' Babers said. ''It only took one the way we were playing.''

Dungey outdueled the Wolfpack's Ryan Finley in a game punctuated by big plays by both stars. Finley was 26 of 44 for a career-high 473 yards and three scores as the teams combined for 1,102 total yards. He hit Kelvin Harmon 11 times for a career-high 247 yards and two scores.

''I think we've got to put it behind us,'' Finley said. ''I think the defense gave us a shot down the stretch. We had a drive to win. We just didn't make it happen. Give them credit. They played well.''

Dungey, who was averaging 273.8 yards offensively per game, passed for 204 yards in a first-quarter blitz that gave Syracuse a 24-7 lead, and his 1-yard plunge in the third quarter, his ninth rushing touchdown of the season and 29th of his career, put the Orange ahead 34-20.

The Wolfpack responded with a 75-yard scoring drive keyed by Finley's 49-yard pass to tight end Cary Angeline, who was all alone down the right side. That set up Brady Bodine's 1-yard run.

Dungey then hit Taj Harris for a 31-yard TD, faking a run before hitting his wide-open freshman receiver. The play left Dungey just 16 yards shy of 10,000 for his career, tops in school history.

Finley's 16-yard pass to Angeline set up Reggie Gallaspy's 1-yard run early in the fourth, cutting the Orange lead to 41-34.

''I'm proud of our guys for finding a way to get back into it,'' North Carolina State coach Dave Doeren said. ''The bottom line, in the second half we couldn't get off the field. We needed to score on every possession. That's the kind of game it was.''

Andre Szmyt's 41-yard field goal, his third field goal of the game, gave the Orange a 10-point lead with 9:44 to play and was his 21st of the season, a school record. Dungey keyed that drive with a 29-yard pass to Sean Riley on a third-and-21 play.

A key for the Orange defense was trying to put pressure on Finley, a tall order considering the Wolfpack had only allowed three sacks on the year. Syracuse pressured a lot and managed to sack him once, but the Orange did force the Wolfpack into four three-and-outs in gaining the big early lead.

After a 29-yard field goal by Szmyt early in the first, Finley hit a streaking Emeka Emezie down the middle for a 67-yard touchdown and a 7-3 lead.

The Orange responded in 36 seconds, with Dungey lofting a perfectly thrown pass to Nykeim Johnson deep down the middle for an 82-yard score.

The Syracuse defense forced two more three-and-outs, and Dungey took advantage. He hit Jamal Custis for 45 yards down the right sideline to set up Jarveon Howard's 2-yard scoring run, then completed a 20-yard touchdown pass to Custis for a 24-7 lead with 2:39 left in the opening period. The scoring pass to Custis was set up by a 48-yard completion by tailback Dontae Strickland to Riley, who had 10 catches for a career-high 164 yards.

Unfazed, the Wolfpack responded with a 13-point surge to narrow the lead to 24-20, getting a pair of short field goals (25 and 29 yards) from Christopher Dunn and taking advantage of a crucial penalty by the Orange.

After Syracuse forced its fourth three-and-out of the game, Riley was called for roughing the kicker. Given new life, Finley hit Harmon on a 74-yard bomb midway through the second.

Szmyt's 45-yard field goal gave the Orange a 27-20 halftime lead.

THIRD DOWN

North Carolina State entered the game converting half of their third downs in league play (20 of 40), the top mark in the ACC. The Wolfpack converted just 3 of 11 in the opening half and finished 6 of 15.

QUARTERBACK SHUFFLE

DeVito, who had played in five games and was 28 of 53 for 399 yards and four TDs with one interception, played one series in the second quarter to try to jumpstart the Orange offense like he did a week ago. Syracuse punted after three plays that included an intentional grounding.

THE TAKEAWAY

North Carolina State: The Wolfpack have plenty of firepower with Finley at the helm but likely will fall out of the national rankings.

Syracuse: The Orange have not been ranked since 2001 and though they didn't get any votes last week they have proved their mettle. With Dungey at the helm, the offense continues to put up a lot of points. They entered the game averaging 42.6, tops in the ACC, and have scored over 50 four times.

UP NEXT

North Carolina State will try to clinch bowl eligibility at home against Florida State next Saturday

Syracuse plays at Wake Forest next Saturday.

---

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

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.