Cristiano Ronaldo put Madrid on their way with a goal in just the second minute before Karim Benzema made the lead comfortable in the second half to give the visitors a first Spanish league trophy under manager Zinedine Zidane.
With a draw enough to win the title, Madrid grabbed their chance immediately as Isco played in Ronaldo, who stepped around goalkeeper Carlos Kameni to provide the opening goal, his 14th strike in his last nine games.
Ronaldo had a chance to add a second goal in the first half but shot straight at Kameni, then after the break suffered a scare following a late tackle from Federico Ricca, though he was OK to continue.
The title was all but sealed in the 55th minute following a corner. Sergio Ramos’ initial shot was saved but came back out to Raphael Varane, who fed Benzema to double the lead.
Madrid comfortably saw out the final minutes and lifted the trophy for the first time since 2011-12. They will have a chance to add to their haul this season when they defend their title as European champions against Juventus in the Champions League final on June 3.
Barcelona fought back from a two-goal deficit to beat Eibar 4-2 but ultimately fell three points adrift of Madrid in the title race.
Takashi Inui provided a shock lead for Eibar in the seventh minute and doubled the visitors’ advantage on the hour mark.
But Barca hit back immediately as Neymar’s shot came off the post into the path of David Junca, who redirected it over the line for an own goal.
Lionel Messi had a chance to equalise on 70 minutes only to see his penalty saved by Yoel Rodriguez, though Luis Suarez was able to level the score from close range three minutes later.
Two minutes after that, Ander Capa was sent off for bringing down Neymar in the box and this time Messi was on target from the spot to complete the comeback, before the Argentina star added another late on with a sliding shot from the middle of the box.