CHAPEL HILL, N.C. (AP) _ North Carolina has agreed to a two-year contract extension with Roy Williams, keeping the Hall of Fame coach with the Tar Heels through the 2019-20 season.

The deal, announced Friday, will pay Williams a base salary of between $408,169 this fall and $595,409 in 2019-20, with supplemental compensation ranging from $1.55 million this fall and $1.75 million in the final year. There’s also a $40,000 annual expense account, along with outside contracts with Nike and for multimedia obligations.

The extension comes amid UNC’s long-running academic fraud scandal involving a department popular with athletes across numerous sports, including men’s basketball. Williams wasn’t charged with wrongdoing in an independent investigation led by former U.S. Justice Department official Kenneth Wainstein nor in the NCAA’s probe that resulted in five charges against the school.

“Roy is a man of character and integrity and I have great respect for the way he leads our basketball program,” athletic director Bubba Cunningham said in a statement.

There are also bonuses for the team’s NCAA Tournament finish and its academic progress rate scores. In a statement, Williams said the extension puts him close to his goal of coaching another six to 10 years.

“I appreciate the confidence Chancellor (Carol) Folt and Bubba Cunningham have in my leadership of the basketball program,” Williams said.

Williams has 750 career wins in 27 seasons that include 15 at Kansas, and he won NCAA titles at UNC in 2005 and 2009.

The school also announced three-year contracts and raises for women’s tennis coach Brian Kalbas and women’s lacrosse coach Jenny Levy.