The last time Roy Williams left North Carolina, he was a virtually unknown assistant who was getting his first shot as a college head coach at tradition-rich Kansas.

Now Williams is leaving the Tar Heels again with a resume chock full of honors — as a retiring Hall of Famer with more than 900 wins, three national championships and a legacy built on more than three decades of success at two of college basketball’s most storied programs.

The school announced the decision Thursday, some two weeks after the 70-year-old Williams closed his 18th season with the Tar Heels after a highly successful 15-year run with the Jayhawks. In all, Williams won 903 games in a career that included those three titles, all with the Tar Heels, in 2005, 2009 and 2017.

Yet Williams described himself as a coach who was also bothered by losses and by his own mistakes over the past two difficult seasons, one marking the only losing record of his career and the other being a young group playing amid the COVID-19 pandemic.

“Everybody wants to know the reason and the reason is very simple,” Williams said at a news conference on the Smith Center court bearing his name. “Every time somebody asked me how long I was going to go, I’d always say, ‘As long as my health allows me to do it.’

“But deep down inside, I knew the only thing that would speed that up was if I did not feel that I was any longer the right man for the job. ... I no longer feel that I am the right man for the job.”

The Tar Heels lost to Wisconsin in the first round of the NCAA Tournament in his final game, his only first-round loss in 30 tournaments.

“I love coaching, working the kids on the court, the locker room, the trips, the ‘Jump Around’ (pregame) music, the trying to build a team,” Williams said. “I will always love that. And I’m scared to death of the next phase. But I no longer feel that I’m the right man.”

Williams thrived with lessons rooted in his time as an assistant to late mentor Dean Smith — he still respectfully refers to him as “Coach Smith” after all these years — even as he forged his own style. Williams always pushed for more — and typically he got it. His teams played fast, with Williams frantically waving his arms for them to push the ball. They attacked the boards with his preferred two-post style.

His competitive drive was fierce and only slightly obscured by his folksy sayings and charm from his time growing up in the North Carolina mountains.

His time as an assistant coach included the Tar Heels’ run to the 1982 NCAA championship for Smith’s first title, a game that memorably featured a freshman named Michael Jordan making the go-ahead jumper late to beat Georgetown.

“Roy Williams is and always will be a Carolina basketball legend,” Jordan said in a statement through his business manager. “His great success on the court is truly matched by the impact he had on the lives of the players he coached – including me. I’m proud of the way he carried on the tradition of Coach Smith’s program, always putting his players first.”

Williams spent 10 seasons at his alma mater under Smith before Kansas took a chance on him in 1988. He spent 15 seasons there, taking Kansas to four Final Fours and two national title games.

Williams passed on taking over at UNC in 2000 after the retirement of Bill Guthridge, but ultimately couldn’t say no a second time and returned as coach in 2003 after the tumultuous Matt Doherty era that included an 8-20 season.

Williams immediately stabilized the program and broke through for his first national championship in his second season with a win against Illinois, marking the first of five Final Four trips with the Tar Heels. His second title came in 2009 with a team that rolled through the NCAA Tournament, winning every game by at least a dozen points, including the final game against Michigan State played in the Spartans’ home state.

The third title was delivered by a team that included players who had lost the 2016 championship game to Villanova on a buzzer-beating 3-pointer. This time, the Tar Heels beat a one-loss Gonzaga team for the championship.

Williams had just that one losing season — an injury-plagued 14-19 year in 2019-20 — and otherwise missed the NCAA Tournament only in his first season at Kansas, when he inherited a program on probation, and in 2010 with a UNC team that reached the NIT final.

Philadelphia 76ers guard Danny Green, who played four seasons for Williams and was part of the 2009 title winner, said Williams had been a “father figure.”

“I became a man in four years there,” said Green, a three-time NBA champion who recently made a $1 million endowment scholarship gift to the Tar Heels’ basketball program. “He’s always been more than a coach to me. He taught me how to be a man and how to do things the right way.”

___

AP Sports Writers Steve Reed and Tom Withers contributed to this report.