Deportivo La Coruna narrowly escaped relegation when they came from two goals down to draw 2-2 at champions Barcelona on the final day of La Liga which also marked Xavi's final league appearance for Barcelona.
Xavi is the longest serving player in Barcelona's history, having been with the club for 24 years after joining aged 11.
He has made over 500 appearances for the Spanish champions and won 23 trophies, including three Champions League and eight La Liga titles. Xavi is also a World Cup winner with Spain.
Deportivo's comeback against a second-string Barca, who wrapped up their fifth title in seven years last weekend, sent Eibar back down after one season in the top flight despite the Basque's club's 3-0 win at already relegated Cordoba.
It also put a slight dampener on an emotional appearance for Barca captain Xavi, who hoisted the trophy after the match at a festive Camp Nou.
The former Spain international, 35, announced on Thursday he was leaving the club after 17 seasons and 23 trophies to join Qatari side Al Sadd.
|Xavi has been at Barcelona since the age of 11 [Getty Images]
Elsewhere, Atletico Madrid secured a berth in the Champions League group stage for next season with a 0-0 draw at Granada, while Valencia twice had to come from behind to beat Almeria, who were relegated, 3-2 and clinch fourth and a spot in qualifying for Europe's elite club competition.
Sevilla, Europa League holders and finalists again this season, won 3-2 at Malaga to finish fifth, sending them into the continent's second-tier competition again next season along with sixth-placed Villarreal and Athletic Bilbao in seventh.
Bilbao, who are through to next Saturday's King's Cup final to play Barca, ended the campaign with a flourish by thrashing Villarreal 4-0 at the San Mames.
Athletic Club 4-0 Villarreal
Celta Vigo 3-2 Espanyol
Eibar 3-0 Cordoba
Barcelona 2-2 Deportivo Coruna
Granada CF 0-0 Atletico Madrid
Levante 0-0 Elche
Malaga 2-3 Sevilla
Rayo Vallecano 2-4 Real Sociedad
Almeria 2-3 Valencia
Source: Al Jazeera and agencies