London - Struggling West Ham said on Sunday they had appointed David Moyes as manager for the second time in a bid to safeguard their place in the Premier League.
Moyes, whose career has never recovered from a deeply unsuccessful spell as Manchester United boss in 2013-14, succeeds Manuel Pellegrini, who was sacked after a 2-1 defeat to Leicester on Saturday that left the Hammers just one point above the relegation zone.
The 56-year-old has been without a club since leaving West Ham after a six-month spell in the 2017-18 season.
Moyes guided West Ham to safety that season after Slaven Bilic was dismissed in early November and will be tasked with doing the same for a second time.
"It's fabulous to be back," said Moyes in a club statement.
"I'm feeling very proud that I'm back here at West Ham. But I think more importantly I'll be looking to see what I can do and what I can make improvements to.
"I do believe that the squad of players I've got here is a better squad of players than when I took over before, so I am looking forward to working with them."
The West Ham hierarchy were keen to make a swift appointment following Pellegrini's sacking ahead of Wednesday's crucial clash with fellow strugglers Bournemouth at the London Stadium.
"David proved in his short time with the club that he was capable of getting results and we believe that he will start moving the club in the right direction once again," said West Ham's co-chairman David Sullivan.
"We are delighted to welcome David back - he knows the club well and he built strong relationships during that time which will be crucial for the work that needs to be done going forward."
Moyes won nine and drew 10 of his 31 previous games in charge of the club.
He made his name in 11 successful years at Everton, but was sacked after less than a year as Alex Ferguson's successor at Manchester United.
Moyes also struggled in short spells at Real Sociedad and Sunderland before taking the West Ham job first time round on a short-term contract.
He was not offered a new deal despite comfortably keeping the club up by finishing 13th.
However, West Ham's ambitious appointment of former Real Madrid and Manchester City boss Pellegrini did not pay off as the Chilean was let go on Saturday after a run of seven defeats in nine Premier League matches.