Pep Guardiola's final game in charge of Barcelona at the Camp Nou ended in victory, whilst champions Real Madrid left it late at lowly Granada.
Guardiola's last game in charge will be next week at Real Betis, but he said goodbye to his home fans in fine style with a 4-0 win over city rivals Espanyol.
The ubiquitous Lionel Messi was at his brilliant best as he claimed all four goals, taking his season's total to a remarkable 72.
Real Madrid made hard work of their 2-1 win at lowly Granada - who could still be relegated on the last day of the season next week.
Franco Jara put Granada ahead just five-minutes in and it was not until nine-minutes from time when Cristiano Ronaldo levelled from the spot.
Then, in injury time, David Cortes put through his own goal to give Real the win. The match ended in ugly scenes with two Granada players sent-off as they confronted the referee at the final whistle.
Valencia confirmed third place after they claimed a late 1-0 win over Villarreal with Jonas scoring in injury time.
Malaga go into the last day knowing three points would secure the fourth UEFA Champions League spot - although Atletico Madrid moved to within two points of them after a 2-1 win at the Vicente Calderon.
Eliseu gave Malaga a first-half lead but second-half strikes from Koke and Adrian won it for the Europa League finalists.
Levante dropped down to sixth and Real Mallorca are now level with them in seventh after they claimed a 1-0 win thanks to Pina's goal just before the hour.
At the bottom, with Racing Santander already relegated, the final two relegation spots could still be filled in theory by five different clubs.
Second from bottom Sporting Gijon claimed a 2-1 win over Real Betis with Gaston Sangoy's brace sandwiching an effort from Jorge Molina - but they face a tough trip to Malaga next week.
Real Zaragoza remain third from bottom but their recent fine form continued with a 2-1 win over Santander. Christian gave Racing the lead but goals from Helder Postiga and Angel Lafita sealed the win.
Zaragoza are now level on points with Rayo Vallecano, who lost 5-2 at Sevilla.
An action packed match in Seville, saw the home side go ahead through Baba on the half-hour before Diego Costa levelled for the visitors.
Further goals from Baba again, Cala and Jose Antonio Reyes secured the win with Costa adding another consolation for Rayo.
Rayo and Zaragoza are just a point off Villarreal and another point off Granada going into the final game next Sunday.
Elsewhere, Ibrahima Balde gave Osasuna a 1-0 win over Real Sociedad whilst Athletic Bilbao warmed up for the Europa League final with a goalless draw at home to Getafe.