Lionel Messi scored a hat-trick as Barcelona clinched a 25th La Liga title on Sunday after winning 4-2 at Deportivo La Coruna despite throwing away a two-goal lead in a thrilling game which also confirmed Depor's relegation.
Atletico Madrid tightened their grip on second place by winning 1-0 at Alaves with a penalty from Kevin Gameiro, while Valencia's quest to seal Champions League qualification must wait after they were held to a goalless draw at home to Eibar.
Barca only needed a draw to seal the title and they made a perfect start when record signing Philippe Coutinho scored with a stylish chip before Messi doubled the lead by volleying home a cross by Luis Suarez.
Deportivo deservedly pulled one back through Lucas Perez five minutes before halftime and Turkish midfielder Emre Colak equalised in the 68th minute.
Clarence Seedorf's side needed victory to survive in the top flight for another week and they came close to finding a third goal and becoming the first team to beat Barca in the league this season.
But the runaway leaders kept counter-attacking and it was top scorer Messi who restored their lead, striking from close range in the 82nd minute after being teed up by Suarez.
Messi claimed his 32nd league goal of the season with the help of another pass from Suarez to round off the victory and give Barca a seventh La Liga title in 10 years.
"When you have been chasing the title for so long you feel a lot of happiness at winning it at last but as well as that we feel satisfied," Barca coach Ernesto Valverde told reporters.
"We have won it with a very big margin and in the end we were the best in the league."
Valverde's unbeaten side have 86 points after 34 games, second-placed Atletico have 75 from 35 and third-placed Real Madrid 71 from 35. Deportivo are 18th on 28th, 12 points adrift of 17th-placed Levante with three games left.
While Deportivo's players and supporters mourned their return to Spain's second tier for the first time since 2014, Barcelona's squad formed a human chain and danced around the centre circle.
"This double tastes glorious," said midfielder Sergio Busquets.
"Winning seven league titles out of the last ten is outrageous and just look at how we did it this year, with four games remaining. We have had an almost perfect Liga campaign."
Atletico earned a first away league win for over two months by snatching a 1-0 victory at Alaves thanks to a late penalty converted by French forward Gameiro after Fernando Torres had spurned an earlier spot-kick. Atletico forward Angel Correa was sent off in stoppage-time after two bookings.
Atletico coach Diego Simeone rested key players including talisman Antoine Griezmann and goalkeeper Jan Oblak to keep them sharp for Thursday's Europa League semi-final second leg against Arsenal.
Fourth-placed Valencia hoped to seal a return to the Champions League for the first time in three years when they hosted Eibar but they could only draw a blank against the Basques. They will clinch their objective if Real Betis fail to beat Malaga on Monday.