Luis Suarez’s 88th-minute winner against Osasuna has left Atletico Madrid on the brink of clinching the LaLiga title for only the second time since 1996.
Diego Simeone’s side were staring at a shock defeat after Ante Budimir headed the visitors in front with just 14 minutes remaining.
But substitute Renan Lodi netted for Atletico in the 82nd minute before Suarez’s late decider.
Atletico, who were champions in 2014 under Simeone, head into the concluding round of fixtures next Sunday with a two-point advantage over Real Madrid.
Los Blancos kept alive their hopes of retaining their title following a 1-0 win at Athletic Bilbao, Nacho Fernandez scoring the only goal of the game midway through the second half.
Real host Villarreal on the final day, while Atletico travel to Real Valladolid.
Santi Mina shattered Barcelona’s dwindling hopes of winning the title as his brace for Celta Vigo condemned Lionel Messi and company to a 2-1 defeat at the Nou Camp.
Messi briefly dragged Barca to within two points of Atletico when he put his side ahead, but Santi’s double created an insurmountable gap for Ronald Koeman’s men.
The result means the Catalan club will finish outside the top two for the first time since 2008 as their Madrid rivals Real and Atletico are now out of reach.
Elsewhere in Spain, Eibar were relegated from LaLiga following a 4-1 defeat at Valencia. The result leaves them three points behind Huesca, who lost 1-0 away at Real Betis, with a worse head-to-head record.
Elche won 3-1 at Cadiz to provide themselves with a chance of staying up.
Carlos Bacca scored a hat-trick as Villarreal secured a 4-0 win against 10-man Sevilla, while Real Sociedad also scored four times in a 4-1 home win against Valladolid.
Takefusa Kubo struck in the 84th minute in a 2-1 triumph for Getafe against Levante, while Alaves ran out 4-2 victors against Granada.
Long-term Ligue 1 leaders Lille are at risk of being leapfrogged on the last day of the season after St Etienne held them to a goalless draw at the Stade Pierre Mauroy on Sunday.
Paris St Germain are now just one point behind Les Dogues after thrashing 10-men Reims 4-0 thanks to a Neymar penalty and goals from Kylian Mbappe, Marquinhos and Moise Kean. Yunis Abdelhamid saw red at the Parc des Princes.
Monaco are lurking in third after a 2-1 home victory over Rennes which saw Wissam Ben Yedder and Aleksandr Golovin notch for the principality side, with Axel Disasi’s own goal boosting Rennes before Damien Da Silva was sent off late on.
Nimes were relegated after losing 5-2 at home to Lyon while Nantes cruised past Dijon 4-0, Bordeaux beat Lens 3-0, Strasbourg triumphed 2-0 at Nice, Lorient edged past Metz 2-1 and Montpellier shared the spoils from a stalemate with Brest at the Stade de la Mosson.
In Germany, Borussia Dortmund secured Champions League football for next season as they continued their fine recent form with a 3-1 win at Mainz.
Raphael Guerreiro, Marco Reus and Julian Brandt struck to earn newly-crowned DFB-Pokal winners Dortmund a seventh successive win in all competitions, before Robin Quaison netted a stoppage-time consolation from the penalty spot for Mainz.
In Sunday’s other game, RB Leipzig – who are already guaranteed to finish second behind champions Bayern Munich – fought back to draw 2-2 at home to Wolfsburg.
Maximilian Philipp’s first-half double looked set to earn Wolfsburg victory, but Justin Kluivert and Marcel Sabitzer salvaged a point for the hosts.
Napoli made a last-ditch bid for second place in the Serie A table by winning 2-0 at 10-man Fiorentina on the penultimate weekend.
Viola goalkeeper Bartlomiej Dragowski’s dismissal made it easier for Lorenzo Insigne to fire the visitors ahead and Lorenzo Venuti’s own goal sealed the outcome.
AC Milan could have reclaimed third had they found a way past Cagliari at San Siro, where the late game finished 0-0.
Already-relegated Parma capitulated 3-1 at home to local rivals Sassuolo, while Benevento will almost certainly join the Crociati in Serie B following their 1-1 home draw against Crotone.
Elsewhere, Fabio Quagliarella, 38, rolled back the years to fire Sampdoria to a 1-0 win at Udinese.