Manchester City have confirmed that manager Kevin Keegan has left the club 15 months ahead of his expected departure date by mutual consent.

The 54-year-old goes after just over three-and-a-half years in charge.

"Kevin stated he was finishing at the end of next season - that was a talking point in the media that would not go away," said club chairman John Wardle.

"We discussed the rest of this season and felt it was in the best interests of the club that Kevin move on."

He added: "Myself and Kevin have had a great working relationship. As well as chairman and manager I would say we are friends and will remain friends."

News of Keegan's exit broke late on Thursday night, but despite his premature departure, Keegan's stint in charge - three years and 10 months - makes him City's longest-serving manager for 26 years.

And while the club begins the search for its 10th manager in just 12 years, coach Stuart Pearce will be responsible for first-team affairs until the end of the season, with Tottenham away his first game on 19 March.

Keegan, who had previously managed Newcastle, Fulham and England, took over as City manager on 24 May 2001 and guided them to the old Division One title in his first full season.

For the return to the Premiership he put together a squad including Nicolas Anelka and Robbie Fowler, and achieved a finishing position of ninth while qualifying for the Uefa Cup through the Fair Play League.

But the following season, 2003-2004, saw them knocked out of the Uefa Cup by Polish minnows Groclin Dyskobolia and also finish fifth from bottom in the Premiership.

That campaign did include a memorable FA Cup victory at Tottenham, when they went 3-0 behind but won 4-3, but it was to be a rare highlight.

The current season has not been much better, with an FA Cup exit to Oldham and a Carling Cup defeat to an Arsenal reserve team.

Goalkeeper David James admitted he was relieved the uncertainty over Keegan's position had been cleared up.

He told BBC Radio Five Live: "There was a lack of specific goal-setting. I like to know where I'm going, but it would be wrong of me to criticise what's been going on because I have never worked on that side of the profession."

Keegan made it clear he would not be staying beyond next season but when City lost at home to Bolton on Monday, and slipped to 12th in the table, Keegan sounded at the end of his tether.

"We've got a history of not building on good situations," he admitted.

"We could have jumped into the European shake-up, again we couldn't make that leap.

"That's seven or eight times in a year we could have jumped into something good for this club and we've failed."