BARCELONA, Spain - Spanish club Real Sociedad hired former Manchester United manager David Moyes on Monday, giving the Scotsman a chance to revive his career after his failed stint at Old Trafford.

Sociedad posted a statement on its website saying it had "reached a deal with manager David Moyes to be the coach of the first team until June 30, 2016."

It is Moyes' first coaching assignment since being fired last season after less than a year in charge at United, where he took the top job after Alex Ferguson retired. Moyes had moved to United after spending more than a decade at Everton, where he established a reputation as one of the top British managers.

The San Sebastian-based Sociedad is 15th in the 20-team Spanish league after earning a 2-1 win over Atletico Madrid on Sunday under caretaker coaches.

The Basque club said it will announce plans to present Moyes and detail the rest of his coaching staff on Tuesday.

Sociedad fired Jagoba Arrasate after earning just one win in the first 10 rounds of the league and failing to reach the Europa League group stage in his second year in charge of the team.

Sociedad president Jokin Aperribay said last week that Moyes was one of four potential candidates to replace Arrasate. The other identified candidate was former West Bromwich Albion and Real Betis boss Pepe Mel.

Moyes will inherit a team known for its attractive, passing-based style during recent seasons that led it to a fourth-place finish and Champions League berth in 2013. The team lost forward Antoine Griezmann and goalkeeper Claudio Bravo this off-season, but it still has Mexican forward Carlos Vela to lead its attack, Inigo Martinez to anchor its defence, and veteran Xabi Prieto in the midfield.

Manchester United fired Moyes in April, just 10 months after Ferguson had hand-picked him as his successor. Moyes failed to uphold Ferguson's winning legacy and left the team then languishing in seventh place in the Premier League and assured to miss qualifying for the Champions League for the first time in 19 years.

United, however, hasn't fared better this season under Luis Van Gaal. The 20-time English champions are in seventh place after 11 rounds, trailing leader Chelsea by 13 points.

Moyes will now have the opportunity to turn around his career and Sociedad's fortunes by re-floating the club's campaign to qualify for the Europa League with a sixth- or seventh-place finish, instead of worrying about a late-season relegation battle.

His first task will be building on the boost of confidence the team got from its win at the weekend over the defending Spanish champions.

Moyes' debut for Sociedad will be on the road at struggling Deportivo La Coruna after the international break on Nov. 22.