setting Real Madrid to finally dislodge Barcelona from its perch atop the Spanish league with a competition-high 32nd title and its first in four long seasons dominated by its biggest rival. Madrid won 3-0 at Athletic Bilbao Wednesday for its first league championship since 2008, forcing Barcelona to relinquish the title after three straight years despite winning 4-1 against Malaga in a game in which Lionel Messi broke a 39-year-old European club scoring record by hitting a hat trick to take his season total to 68 goals. Madrid, which can set a record total of 100 points with victories in its last two games, has already broken a 22-year mark for most goals scored in a season, while Jose Mourinho became the first coach to win titles in four different European leagues. “It was difficult to beat a team like Barcelona, but we managed it,” captain Iker Casillas said. “We had to overcome our rival's greatest period, and those who have been here longer have seen it all. In the end, you have to be the best of the best to win the league.” Madrid's players celebrated wildly after the final whistle at San Mames stadium, with Mourinho displaying seven fingers to symbolize the number of league titles he has won in his career, including at FC Porto, Chelsea and Inter Milan. “This was the most difficult one,” said Mourinho, who team has a seven-point lead over Barcelona with two rounds left. “The players are all very happy after 10 months of fighting, of training, of games, the objective was to be champion so we are happy to have achieved it,” Cristiano Ronaldo said. Gonzalo Higuain's 16th-minute goal proved the winner, with the Argentina striker clinching Madrid's latest title four years after his goal secured its last. Mesut Oezil doubled the lead four minutes later before Ronaldo added his 58th goal of the season in the 50th – and the club's record 115th this campaign – to make up for a penalty in the 12th that was saved by goalkeeper Gorka Iraizoz. Ronaldo also missed a penalty in the Champions League semifinal shootout loss to Bayern Munich last week. “I have two Golden Boots at home. So if I win the third, great. If not, no problem,” said Ronaldo of the race to finish as Europe's leading scorer. Messi broke the record of 67 goals Gerd Mueller set for Bayern Munich in 1972-73. He converted penalties in the 35th and 59th minutes and chipped goalkeeper Carlos Kameni in the 64th for his seventh league hat trick, tying the mark set by Ronaldo this season. The 24-year-old Messi has played 57 games for Barcelona this season, and broke records by scoring 46 goals in the league and 14 in the Champions League. “Barcelona tried,” said Guardiola, who is stepping down to be replaced by assistant Tito Vilanova at the end of the season. “There wasn't much difference. The league is very long and he who deserves to win, wins. And Madrid was a deserved winner.” Guardiola won the Club World Cup and European Super Cup this season, but even a Copa del Rey final win later this month would do little to ease the disappointment of losing the domestic title after being eliminated from the Champions League by Chelsea. Earlier, Zaragoza beat Levante 1-0 to keep its hopes alive of avoiding relegation following Rayo Vallecano's 1-0 loss at Mallorca. Also, substitute Carlos Vela's stoppage-time goal gave Real Sociedad a 1-1 draw at 10-man Atletico Madrid. Valencia thrashed 10-man Osasuna 4-0. Levante is three points behind Malaga. Atletico trails Malaga by five points. Real Betis came from behind to beat city rival Sevilla 2-1.