Atletico Madrid edged city rivals Real Madrid to the La Liga title in dramatic fashion by coming from behind to beat Real Valladolid in the final game.
Diego Simeone's side trailed to Oscar Plano's strike but turned the match around in the second half through goals from Angel Correa and Luis Suarez.
Real scored twice late on to beat Villarreal 2-1 but came up short as they needed Atletico to drop points.
Atletico clinched their first title in seven years and their 11th overall.
It was a highly satisfactory triumph for Los Colchoneros as they finished two points ahead of defending champions Real, who end the season without silverware.
Barcelona - playing without skipper Lionel Messi, who was resting before the summer's Copa America - won 1-0 at Eibar through Antoine Griezmann's acrobatic strike and clinched third place ahead of Sevilla.
Eibar's relegation had already been confirmed before the game and they finish bottom of the table on 30 points, returning to the second tier after seven years in Spain's top flight.
Julen Lopetegui's side play their final league game on Sunday against Alaves but will finish fourth even with a victory because of an inferior head-to-head record against Barca.
Hundreds of fans celebrated in central Madrid after the match, while the police drafted in extra officers and drones to monitor the situation.