Newly-crowned La Liga champions Real Madrid were unable on Sunday to maintain their perfect run of results since the season re-started.
They drew 2-2 at neighbours Leganes, who were relegated.
Real Madrid ended the campaign on 87 points after the draw interrupted a run of 10 consecutive victories, five clear of second-placed FC Barcelona.
Leganes finished 18th on 36 points, joining 19th-placed Real Mallorca and Espanyol in being relegated, while Celta Vigo, who finished on 37, stayed up at Espanyol. Sergio Ramos headed home his 11th league goal this season to put Real Madrid in front after nine minutes.
Zinedine Zidane heavily rotated his team following the 2-1 win over Villarreal on Thursday that clinched their first Liga title since 2017, and it told on their performance.
Leganes levelled on the stroke of half-time through midfielder Bryan Gil, but Marco Asensio restored Real Madrid’s lead early in the second half.
Roger Assale equalised in the 78th minute to give Leganes a slither of hope of survival and they needed one more goal to pull off a miraculous escape from relegation.
They came agonisingly close to finding it, having a late penalty kick appeal turned down for handball against Luka Jovic after a VAR review.
Oscar Rodriguez then blasted over from inside the area deep in added time, and the Madrid side dropped out of the top flight for the first time since 2016.
That was when they won their maiden promotion to La Liga.
“Even though we didn’t get the result we wanted, the sacrifice was worth it and we are proud to have fought until the end,” said Leganes defender Unai Bustinza.
“What we have done should be seen as an example that you should never give up.”