Madrid: Atletico Madrid slumped to a 3-0 defeat at resurgent Real Sociedad on Thursday which means Barcelona need one more victory to wrap up a 25th Spanish La Liga title while Malaga were relegated after losing 1-0 at Levante.
Second-placed Atletico were outplayed by Sociedad from start to finish and fell behind in the 27th minute to a thumping strike off the post from forward Willian Jose after a cut-back from former Manchester United winger Adnan Januzaj.
The Basque side have been on a good run of form since Imanol Alguacil succeeded sacked coach Eusebio Sacristan and they welcomed Atletico after hammering Girona 5-0 and winning 1-0 at Las Palmas in their last two games.
They continued to create chances against Atletico, who were missing striker Diego Costa through injury, and sealed a deserved victory when forward Juanmi knocked in a pass from Willian Jose in the 80th minute.
Juanmi struck again in stoppage-time to complete Atletico's heaviest league defeat this season, sending Real Sociedad up to 11th in the standings.
Second-placed Atletico have 71 points after 33 games while Barca have 83 and third-placed Real Madrid 68. Barca, who drew 2-2 with Celta Vigo on Tuesday and are still unbeaten in the league, will clinch the title if they win their next league game away to Deportivo La Coruna on April 29.
"We need to analyse what has happened and take steps to improve in our final few games because recently we have suffered a lot away from home," said Atletico coach Diego Simeone, whose side have lost three of their last four away games in all competitions.
"We had a bad first half and although we improved we couldn't manage to score and Real Sociedad finished the game stronger than us and we have to congratulate them on the victory."
Basement club Malaga dropped out of La Liga for the first time in a decade after losing 1-0 at Levante, conceding the decisive goal deep in stoppage-time when Emmanuel Boateng stabbed home from close range to take his side seven points clear of the drop zone with five games remaining.
Las Palmas are on the verge of being relegated after losing 1-0 at Real Betis, who snatched the win with a 93rd-minute goal from left winger Junior.
Las Palmas are 13 points adrift of safety with four games remaining and face a near-impossible task to avoid returning to Spain's second tier.