North Carolina agreed to terms on a seven-year contract with coach Larry Fedora, athletic director Bubba Cunningham said Saturday.

In an interview with The Associated Press, Cunningham said the deal would run through the 2022 season. He said the deal changes Fedora's financial terms, which will be released once the school's trustees grant final approval, though it was unclear exactly when that would happen.

The agreement, first reported by ESPN, comes shortly before the No. 8 Tar Heels face No. 1 Clemson in the Atlantic Coast Conference championship game in Charlotte. UNC won 11 regular-season games and completed its first-ever 8-0 run through ACC play under Fedora, now in his fourth season.

UNC previously hadn't won more than eight games nor had been ranked in the top 10 of the Associated Press poll since 1997, Mack Brown's final season before leaving to take over at Texas.

"I think the key to long-term success is consistency in the coaching staff," Cunningham said. "And he has done an excellent job building the program and attracting students that are very successful athletically and academically."

RELATED: 2015 FBS Coaching Carousel

Fedora had three years left on his original seven-year contract after arriving to UNC from Southern Mississippi in December 2011.

Fedora's name had been mentioned with other coaching vacancies, and he was asked about the South Carolina opening during Friday's news conference previewing the ACC title game. He declined to comment about other jobs.

He was also asked Monday about what made the UNC job the right fit for him four years ago.

"It's the same things that attract me to it right now," he said then, "(and it's) that we have all the pieces of the puzzle to do what we're doing right now. ... We've got great support. We can attract great players that want to be successful on the field and off the field. And so everything's here, everything that we need."

Fedora, who was 32-18 at UNC entering the Clemson game, has guided the Tar Heels during a bumpy few years due to a long run of NCAA turmoil. UNC originally offered him a longer deal because it had put itself on two years of probation and was the middle of an infractions case tied to improper benefits and academic misconduct within the program, which launched in summer 2010.

Fedora ultimately inherited sanctions that included scholarship reductions and a one-year postseason ban, which sidelined the Tar Heels from playing in the ACC title game in his first season.

The Tar Heels are still playing amid an NCAA investigation into an academic fraud scandal, an offshoot of the original case that has led to five more largely broad-based charges against the school. It's been a constant obstacle in recruiting, and UNC only recently emerged from scholarship reductions.

"Now we're extending because we're pleased with the work he has done," Cunningham said in comparing the two seven-year deals. "And that consistency is what we're looking for."

This article was written by Aaron Beard from The Associated Press and was legally licensed through the NewsCred publisher network.