Spanish leader Real Madrid closed in on its first league title in four years by strolling to a 3-0 victory over Sevilla, though Barcelona prevented its arch rival from seizing the trophy for at least another round with a 7-0 thrashing of Rayo Vallecano on Sunday.

Spain's powerhouses recovered from unexpected midweek Champions League semifinals exits with easy victories, as Madrid maintained its seven point advantage over the three-time defending champions for at least another three days as the countdown on Barcelona coach Pep Guardiola's tenure began.

Madrid can secure its record 32nd championship regardless of Barcelona's result against Malaga Wednesday if its wins at Athletic Bilbao.

"The sooner [we win the league], the better," Madrid assistant coach Aitor Karanka said Madrid extended its league record goal tally to 112 goals with three games remaining for the club to further inflate the total.

Karim Benzema struck twice in quick succession following Cristiano Ronaldo's record 43rd league goal as Madrid bounced back from losing to Bayern Munich on penalties at midweek.

Meanwhile, Lionel Messi scored a pair to end a four game scoreless run and match Ronaldo's 43-goal mark with his 65th goal in all competitions. The Argentina forward had a hand in an own goal by Roberto Correa, a strike by Seydou Keita and Pedro Rodriguez's brace as the Catalan club ended a three-game winless stretch, with Thiago Alcantara also scoring.

Guardiola announced Friday he would depart at the end of the season with assistant Tito Vilanova taking over, and the coaching pair behind Barcelona's most successful period could only be pleased by the team's reaction at the Vallecas Stadium.

Messi scored from a typical Barca buildup in the 16th minute as Sanchez dragged his markers into the centre before passing wide to Pedro, who unselfishly picked out Messi at the far post.

Messi won possession in midfield in the 26th and Keita collected to put Sanchez through, with the Chile striker getting past goalkeeper David Cobeno and seeing his shot from an impossible angle turned in by Correa.

Messi cut inside past two defenders in the 38th and slid a spectacular pass through the legs of a third Rayo player for Keita to slot past Cobeno for 3-0.

The world player of the year, who was left in tears following Barcelona's unlikely Champions League exit to Chelsea, certainly looked refreshed as he fed Sanchez to the left and met the Chilean's return pass inside the area for a shot that came off the crossbar but onto the path of Pedro for an easy goal.

Messi laid the ball off for Thiago to head substitute Daniel Alves' cross home in the 77th before Pedro controlled Messi's long ball to blast past Cobeno in the 87th.

Messi added his second in the 90th minute to match Ronaldo's for the record league total after the Portugal forward opened the scoring at the Santiago Bernabeu stadium with his 57th goal of the season, as he recovered from a missed penalty against Bayern Munich.

The European loss left Madrid without a Champions League final appearance for 10 years.

"This is good for us, it was a very important game for us as we continue on looking to be champions," Benzema told Canal Plus TV as Madrid reached 91 points to Barcelona's 81. "The Champions League is in the past, we only care about the league now."

Benzema set up Ronaldo's 19th-minute opener as he rolled a short pass into his teammate's path and the Portugal forward cut back to shake his marker and slot home a low shot inside the opposite corner.

Benzema atoned for a pair of first-half misses in the 48th when he redirected Angel di Maria's skipping cross into the area past Varas. Four minutes later, Varas could only watch the France striker's powerful header fly past him into the top of the goal. It was the Frenchman's 20th league goal and 31st in all competitions, making this his best season at Madrid.

Madrid goalkeeper Iker Casillas was rarely tested aside from Alvaro Negredo's weak first-half effort, while Barcelona goalkeeper Jose Manuel Pinto made a pair of impressive diving stops in the first half in a rare league start in place of Victor Valdes. Andres Iniesta and Cesc Fabregas were on the substitutes' bench while Xavi Hernandez and Gerard Pique were missing due to injury.

Under the watchful eye of Qatar owner Sheik Abdullah Bin Nasser Al-Thani, Malaga continued its run toward securing a Champions League spot as it beat Valencia 1-0 to match the third-place club's 55-point total.

Ignacio Camacho headed in the 27th-minute winner for the hosts, who enjoyed a man advantage over the final half hour after Sofiane Feghouli was red carded for clashing with Jose Rondon.

Malaga is three points ahead of Levante in the race for the league's final Champions League qualifying spot, which slipped further out of reach for Europa League finalists Atletico Madrid and Athletic Bilbao.

Real Betis scored twice in the final four minutes to lead 2-1 before Rademel Falcao headed home his 23rd goal of the season in the 94th for Atletico to salvage a 2-2 draw.

Zaragoza maintained its chances of avoiding the drop with a 2-0 victory over Athletic, which has 48 points to sit one back of Atletico.

Zaragoza join Sporting on 34 points, four behind Villarreal in the last safe spot. Racing Santander has already been relegated.

"The team is drained, the players have given their all," Zaragoza coach Manolo Jimenez said. "We're going to feel tired over the final stretch but the best remedy for the bruises, muscle problems and fatigues are victories."