Barcelona finished 13 points behind La Liga champions Real Madrid after ending their turbulent season with a whimper on Sunday by losing 2-0 at home to Villarreal.
Atletico Madrid secured third place by winning 2-1 away at Real Sociedad, retaining their one-point lead over Sevilla, who won 1-0 at home to Athletic Bilbao.
Athletic's defeat, combined with Villarreal's excellent victory at Camp Nou, means Villarreal beat Athletic into seventh and qualify for the Europa Conference League.
Villarreal's season was lit up by their sensational run to the semi-finals of the Champions League but Unai Emery's team have suffered from inconsistency against the lower sides in La Liga and will be demoted to Europe's third-tier competition next term.
Athletic finished eighth while Real Sociedad held onto sixth and Europa League qualification, despite their loss at home to Atletico Madrid.
Barca already had second place and a spot in the top four wrapped up but Xavi Hernandez will be concerned heading into the summer about how his team has faded.
"We feel a bit sad about today's result," Dani Alves told Barca TV. "We have to reflect, change our mentality next season and put more effort on the pitch because we are representing this great club and we cannot reach the end of the season again without competing for anything."
Defeat by Villarreal means Barcelona lost four of their last nine games in all competitions while Real Madrid won La Liga at a canter.
After being appointed in November, with the team lying ninth, Xavi revived the team and achieved the most important objective of qualifying for the Champions League.
But going out to Frankfurt in the Europa League semi-finals and Athletic Bilbao in the Copa del Rey was disappointing while the drop-off during the run-in suggests there is still a lot of work to do.
Villarreal's two goals came either side of half-time as Alfonso Pedraza scored in the 41st minute after latching onto a Dani Parejo through-ball before Moi Gomez made it two in the 55th.
Adama Traore was at fault, his attempted clearance across his own box falling straight to Gomez, who fired in, with Traore substituted immediately after.