Keegan was in the stands to see his new side beat Cup opponents Stoke

Keegan, 56, managed the Magpies from 1992 to 1997 and returns to St James' Park as Sam Allardyce's successor.

Gerard Houllier and Didier Deschamps were linked with the job in the last two days but the club turned to Keegan.

The former England, Manchester City and Fulham manager said: "It's nice to be home. I'm delighted to be back."

Magpies chairman Chris Mort added: "We didn't think we'd be able to get Kevin back to the club but he's the right man and we're absolutely delighted."

Former Bolton boss Allardyce left Newcastle by "mutual consent" two weeks ago after just eight months in charge.

606: DEBATE Keegan is the man, this is a great chance for him to finish what he started 15 years ago

SJ88

His departure followed a string of poor results and with the club languishing in 11th place in the Premier League table.

With Allardyce gone, there was daily speculation about his possible replacement, with Harry Redknapp quickly emerging as the favourite to take over.

The Portsmouth chief eventually turned down the chance to move to St James' Park, leading to rumours that former Liverpool boss Houllier, ex-Juventus coach Deschamps and Blackburn boss Mark Hughes could all be tempted instead.

Magpies legend Alan Shearer was also thought to be in the frame, although the former England striker finally revealed on Wednesday he had been told by the club that he lacked experience to be their next manager.

In the end, Newcastle owner Mike Ashley plumped for Keegan, a man regarded with reverence on Tyneside.

It's a great soap opera. Locally they will be in raptures but outside it there may well be bewilderment

Mike Ingham

BBC Radio 5 Live football correspondent

Keegan was running his "Soccer Circus" football academy in Glasgow, quit his last job as a manager at Manchester City in March 2005.

He also walked away from Newcastle in 1997 and left the England job suddenly after losing to Germany in October 2000.

Since Keegan left 11 years ago, six permanent managers have come and gone at St James' Park, while it has been 39 years since the club claimed a major trophy.

Keegan had been linked with a return to the club last summer as director of football following Ashley's takeover.

However, Keegan told BBC Sport in October that he was unlikely to manage a team again.

He said: "I don't think it will happen. I think my life has gone in a different direction."

But as speculation increased that he might be tempted back, he said on Monday: "I'm not ruling myself out or in. It's a club I love, everyone knows that."

BBC Radio 5 Live's football correspondent Mike Ingham says Keegan can rejuvenate the club he played for with such distinction from 1982-84.

He said: "Keegan's memory has haunted all his successors, he galvanised them as a player and as a manager.

"It's a great soap opera. Locally they will be in raptures but outside it there may well be bewilderment."

Keegan took Newcastle back into the top flight in 1993 and came close to winning the league title in 1996.

They led Manchester United by 12 points before finishing as runners up.

Newcastle fans celebrate Keegan's return during the replay with Stoke

Keegan went on to manage Fulham, England and Manchester City, whom he left in 2005.

Now he is back at Newcastle, much to delight of the majority of the club's fans.

A sign of how highly regarded Keegan is on Tyneside was reflected in a statement on the Newcastle website: "Geordie messiah to be unveiled as new United manager."

Shearer, who is being tipped to become part of Keegan's coaching team at Newcastle, is a also big fan of Keegan's.

"He is highly thought of in Newcastle and rightly so because of what he did for the club," said Shearer, who was signed by Keegan for £15m in 1996.

"Kevin did something special, he's a special person with special charisma."

Newcastle defeated Stoke 4-1 in an FA Cup replay on Wednesday and afterwards caretaker manager Nigel Pearson said he did not know whether he would remain at the club.

"I could not tell you what will happen," Pearson told BBC Sport. "I am unclear on the situation."

Of the task facing Keegan, he said: "It won't be easy, we have not got a huge squad."