Manchester United confirmed on Thursday that David Moyes will be their new manager, replacing Sir Alex Ferguson, who retired the day before.

Moyes will stay on in his current role as Everton manager until the end of the season and will formally replace Ferguson on July 1.

He has agreed to a six-year contract.

“When we discussed the candidates that we felt had the right attributes, we unanimously agreed on David Moyes,” said Ferguson.

“David is a man of great integrity with a strong work ethic. I’ve admired his work for a long time and approached him as far back as 1998 to discuss the position of assistant manager here.

“He was a young man then at the start of his career and has since gone on to do a magnificent job at Everton. There is no question he has all the qualities we expect of a manager at this club.”

Moyes told Everton chairman Bill Kenwright at a meeting in London on Wednesday that he would leave the club when his contract expires on June 30, and explained his intention to take over at United.

“The chairman, on behalf of the club, would like to place on record his thanks to David for the massive contribution he has made to Everton since his arrival in March 2002,” Everton said in a statement.

More In: Football | Sport