Barcelona slumped to a lacklustre 2-0 defeat to Villarreal on Sunday at Camp Nou in their final match of the 2021-22 season, with Unai Emery's side securing a spot in the Europa Conference League off the back of the victory.
Xavi Hernandez's team had already locked up second place in the Spain behind runaway champions Real Madrid and were undone against Villarreal goals from Alfonso Pedraza and Moi Gomez either side of half-time.
After reaching the Champions League semifinals this season, knocking out former champions Juventus and Bayern Munich on the way, Emery's side entered the final week of the season in danger of missing out on European competition completely.
The visitors scored against the run of play as the first half was winding down, with Pedraza picking up a nice ball over the Barcelona defence and shooting past Marc-andre Ter Stegen to give Villarreal the lead at the break.
Villarreal doubled the lead 10 minutes after the restart -- Gomez smashing home of the centre of the area after a giveaway by Adama Traore -- and went on to keep Barca off the scoresheet for the rest of the match.
With the top six already determined, Villarreal started the day in seventh, one point ahead of Athletic Bilbao who were playing at fourth-placed Sevilla at the same time on Sunday.
Athletic ended up losing 1-0 to Sevilla to finish in eighth place, four points behind Villarreal. Real Betis and Real Sociedad finished fifth and sixth to qualify for the Europa League.
Champions Real Madrid, Barcelona, Atletico Madrid and Sevilla qualified for the Champions League.