Madrid: Barcelona, in their first match since Pep Guardiola announced he would quit at the end of the season, produced a sensational attacking display on Sunday of their own to help ease a little of the pain suffered by their midweek Champions League exit to Chelsea.
Lionel Messi put Barca ahead and then an own goal from `Rober` Correa who turned in an Alexis Sanchez shot, and a Seydou Keita strike gave them a 3-0 lead at the interval.
Pedro Rodriguez got a double in the second half and Thiago Alcantara was also on target before a minute from the end Messi got his second.
It means that Messi is now joint top scorer in the league with Ronaldo on 43 goals.
It was an unfamiliar looking Barcelona side that faced Rayo with Xavi Hernandez and Gerard Pique joining the injured while Guardiola chose to give reserve keeper Jose Pinto and youngster Martin Montoya a run out.
Although they lacked fluidity in the middle of the pitch to begin with they maintained their deadly attacking threat and Messi put them in front with 15 minutes gone after he was unselfishly played in by Pedro in front of goal.
Messi then found Alexis who rounded the keeper and his shot from a tight angle went in off Rober after 26 minutes, while Keita rounded off a fine move to give Barca a three-goal lead before the break.
Messi went past two defenders before nutmegging a third with a pass for Keita to score.
With a minute gone of the second half Pedro added the fourth, knocking in a rebound after Messi`s shot had hit the crossbar and then 13 minutes from the end Thiago headed home but there was still time for further goals from Pedro and Messi.
Real Madrid edged closer to their first league title in four years with a 3-0 win over Sevilla, but Barcelona ensured their celebrations were put on hold with a 7-0 mauling of Rayo Vallecano.
Karim Benzema struck a second half brace after Cristiano Ronaldo had given Real the lead to beat Sevilla as Real took their record breaking haul of league goals for the season to 112 on Sunday.
Victory against Athletic Bilbao on Wednesday will guarantee a first title since 2008 for Jose Mourinho`s team.
"It was an important win and the team deserves to be champions as the players have shown their mentality and character," said Real assistant coach Aitor Karanka.
Referring to their Champions League exit at the hands of Bayern Munich, he added: "The players went into the game tired and down but they responded well, even though winning the league will not cure anything.
"We will go out looking to win games even when we are the champions, if that happens, as we only have one plan. It will be fantastic to win the league and it is the most important objective at the moment."
Mourinho, looking to wrap up the championship as quickly as possible, fielded his strongest side with the only change from the Bayern match being the introduction of Esteban Granero for Sami Khedira.
Both Ronaldo and Benzema tested the visitors` defence with a number of dangerous runs and it seemed a matter of when and not if the hosts would score the opener.
The breakthrough came after 19 minutes when Benzema supplied Ronaldo in the box, allowing the Portuguese striker to turn inside Jorge Coke before smashing the ball into the corner.
While Real were impressive going forward, they were – in keeping with their midweek performance against Bayern -- leaving themselves exposed at the back.
Former Real player Jose Antonio Reyes shot tamely at Iker Casillas and then both Jesus Navas and Negredo fired wide from excellent positions.
Real continued to dominate and Ronaldo was inches away from his second goal moments before the break when he hit the post from an indirect free-kick but in a four-minute spell shortly after the restart, all chance of a Sevilla fightback was ended by Benzema.
Taking advantage of some poor defending, the Frenchman stole in at the far post to roll in an Angel Di Maria cross after Coke mis-kicked in the 48th minute.
Four minutes later Benzema made it three when he headed home a Sergio Ramos cross. (AFP)