Barcelona ended their season with a home defeat against Villarreal as they finished on their lowest La Liga points total in 14 years.
Villarreal, this season's Champions League semi-finalists, booked a Europa Conference League spot with their victory in the Nou Camp.
Alfonso Pedraza ran onto Dani Parejo's pass to give them the lead.
Moi Gomez made it 2-0 after a terrible pass across his own box by Barcelona's on-loan winger Adama Traore.
Frenkie de Jong thought he had pulled one back but his header was disallowed for offside.
Barca finish second on 73 points, 13 behind champions Real Madrid, and without a trophy. Results picked up after Xavi replaced Ronald Koeman as manager but they were too far behind to compete.
The last time they got fewer points was in 2007-08, when they finished third on 67 points.
Elsewhere, fourth-placed Sevilla won 1-0 against Athletic Bilbao, who miss out on European football next season.
Atletico Madrid, who finished third, won 2-1 at sixth-placed Real Sociedad.