Durham, N.C. — North Carolina took things from No. 25 Duke all night: The ball. The momentum. And, finally, the Victory Bell.

The Tar Heels routed Duke 45-20 on Thursday night with Marquise Williams throwing for two touchdowns and rushing for two more.

"I think we finally put together a complete game," coach Larry Fedora said.

Williams was 18 of 27 for 276 yards with touchdown passes covering 3 yards to Quinshad Davis and 1 yard to Mack Hollins. He also had scoring runs of 1 and 16 yards.

Tim Scott returned an early fumble 10 yards for the tone-setting score. The Tar Heels (6-5, 4-3 Atlantic Coast Conference) led 38-7 in earning bowl eligibility while wrapping up the Coastal Division title for Georgia Tech.

Anthony Boone was 22 of 40 for 262 yards with two touchdowns for the Blue Devils (8-3, 4-3). They needed to win their last two to earn a second straight ACC title game berth.

The Tar Heels scored 21 points off Duke's three turnovers. Duke managed 378 total yards against a defense that allows an ACC-worst 512 per game.

"We made mistakes early (and) they capitalized on our mistakes," Boone said. "We usually play mistake-free football, taking care of the football on offense, and they did a good job of capitalizing and creating turnovers."

T.J. Logan rushed for 116 yards and a 1-yard touchdown, and Ryan Switzer caught three passes for 109 yards for the Tar Heels.

They reached the six-win mark for the second straight year and seventh time in eight years while beating Duke for the first time since 2011 — earning the coveted bell that goes to the winner of this fierce backyard rivalry. They rang it repeatedly — and audibly — both on the field and in the locker room.

"They wanted to get it done for the guys from the last two years," Fedora said.

The offense kept clicking behind Williams, who had 98 yards rushing and has accounted for eight touchdowns in six days — he rushed for three and threw for another TD while beating Pittsburgh on Saturday. North Carolina rolled up 591 total yards — three shy of Duke's season worst — with 315 coming on the ground.

"The run game was just there, the offensive line was just pushing everybody," Williams said. "They took control and they let Duke's defensive linemen know, 'Hey, we're here all night and we're going to do some big things.' "

Other Top 25 games

No. 12 Kansas State 26, (at) West Virginia 20: Jake Waters threw for a career-high 400 yards and a touchdown, Tyler Lockett returned a punt for a score and No. 12 Kansas State beat sloppy West Virginia.

Kansas State (8-2, 6-1 Big 12, No. 12 CFP) rebounded from a blowout loss at TCU to move into a first-place tie with the idle Horned Frogs with two weeks left in the regular season. No. 6 Baylor can make it a three-way tie Saturday against Oklahoma State.

Kansas State built a 17-3 halftime lead and held on. Lockett caught 10 passes for 196 yards, and Matthew McCrane kicked four field goals.

West Virginia (6-5, 4-4) committed four turnovers in its third straight loss. Skyler Howard threw two TD passes after Clint Trickett left in the third quarter with an undisclosed injury.