Goals from Maxi Gomez and Iago Aspas saw Celta Vigo beat La Liga champions Barcelona 2-0 at Balaidos on Saturday.
The result also means that Rayo Vallecano are relegated from La Liga after their 4-1 defeat at Levante earlier in the day.
Meanwhile, Atletico Madrid suffered a surprise 3-0 defeat at Espanyol. A Diego Godin own goal put the hosts ahead before Borja Iglesias scored twice to seal the victory.
La Liga Results
Levante 4-1 Rayo Vallecano
Espanyol 3-0 Atletico Madrid
Alaves 0-1 Real Sociedad
Celta Vigo 2-0 Barcelona
La Liga Standings (Played, Goal Difference, Points)
1. Barcelona: 36, +52, 83
2. Atletico Madrid: 36, +26, 74
3. Real Madrid: 35, +20, 65
4. Getafe: 35, +13, 55
5. Sevilla: 36, +13, 55
6. Valencia: 35, +8, 52
7. Athletic Bilbao: 35, -3, 50
8. Real Sociedad: 36, -1, 47
9. Espanyol: 36, -6, 47
10. Alaves: 36, -10, 47
11. Leganes: 36, -3, 45
12. Real Betis: 35, -10, 44
13. Eibar: 35, -4, 43
14. Celta Vigo: 36, -7, 40
15. Villarreal: 35, -3, 40
16. Levante 36: -8, 40
17. Girona: 35, -12, 37
18. Real Valladolid: 35, -19, 35
19. Rayo Vallecano: 36, -28, 31
20. Huesca: 35, -18, 30
Celta Vigo welcomed Barcelona to Balaidos and gave the champions a guard of honour ahead of kick-off:
Barcelona named a youthful side for the game with the league title already wrapped up:
The visitors suffered an early blow when Ousmane Dembele was forced off with an injury in the opening minutes of the game:
Celta had the better of the match and thought they had opened the scoring just after half-time.
Nestor Araujo knocked the ball home from close range after Jasper Cillessen had spilled Sofiane Boufal's header, only to see the video assistant referee rule out the goal for offside.
Barcelona then lost Jean-Clair Todibo to injury and fell behind shortly afterwards. Gomez expertly finished a cross in from the right to put Celta 1-0 up.
Aspas then doubled Celta's lead from the penalty spot after Moussa Wague was penalised for handball:
The win sends Celta into 14th place in the table, and they are now five points clear of the relegation zone with two games left to play.
Atletico Madrid missed the chance to seal second place after slumping to a surprise defeat at the RCDE Stadium on Saturday.
The hosts might have opened the scoring after just three minutes. Striker Alvaro Morata took the ball off Mario Hermoso, but Diego Lopez denied him in the Espanyol goal.
The breakthrough for the hosts came just before half-time. Adria Pedrosa raced down the left and saw his cross deflect off Godin's outstretched boot and past Jan Oblak:
Adrià Pedrosa vs Atletico Madrid 32 passes 91% pass accuracy 2 key passes 3 dribbles won 1 tackle won 2 interceptions 2 clearances + 90m solo run ended with Godin's own goal. One of La Liga's fastest players. Espanyol academy produced another great prospect! 🔵 https://t.co/3DXXezUjzw
Iglesias doubled Espanyol's lead after 52 minutes. He latched on to Oscar Melendo's through ball and beat Oblak from a tight angle.
The striker then grabbed his second from the penalty spot with just a minute of normal time remaining after a clumsy challenge from Juanfran on Javi Puado.
ESPN FC's Dermot Corrigan neatly summed up the Atletico display:
Atletico Madrid still need a point to confirm second place, although they will also be confirmed as La Liga runners-up if Real Madrid fail to beat Villarreal on Sunday.