Former Everton and Manchester United manager David Moyes has agreed to take over as head coach of Real Sociedad until 30 June 2016, the La Liga club announced on their website (www.realsociedad.com).
Moyes, whose turbulent 10-month spell at Manchester United came to an end in April, becomes the highest-paid coach in the club's history with wages of around 2 million euros per year.
The 51-year-old Scot replaces Jagoba Arrasate, who was sacked by the San Sebastian-based club last week after a poor start to the season.
Sociedad have since recovered and upset defending champions Atletico Madrid 2-1 on Sunday. They are 15th in La Liga with nine points from 11 matches.
Moyes made his reputation as a top-flight coach in his previous job at Everton, who finished in the top six in the Premier League four times under the Scot.
They qualified for the Champions League in 2005 and reached the 2009 FA Cup final, where they lost 2-1 to Chelsea after beating Manchester United in the semi-finals.
Moyes replaced the retiring Alex Ferguson at Manchester United on a six-year deal in May last year but left in April after less than a season.
In 51 matches in charge at Old Trafford, the club won 27, drew nine and lost 15 in all competitions, even as the 20-time English champions finished a dismal seventh, missing out on European berths.
Image: New Real Sociedad manager David Moyes
Photo: Richard Heathcote/Getty Images
Shorts: Nishikori carries four billion Asian hopes
Roundup: Chelsea, Bayern maintain lead but Marseille lose
Beckham's eldest son Brooklyn signs short-term deal with Arsenal
Van Gaal must stop history repeating itself at Manchester United
La Liga: Can Atletico defend their crown?