Match ends, Barcelona 6, Rayo Vallecano 1.
Lionel Messi scored the 24th hat-trick of his La Liga career as rampant Barcelona went to the top of the table.
Barca took full advantage of Real Madrid's defeat by Athletic Bilbao as Luis Suarez also scored twice.
Suarez fired the hosts ahead and Gerard Pique forced in the second before Messi netted three in 12 minutes.
He scored a twice-taken penalty, tapped in the fourth and added a classy fifth before Suarez wrapped it up after an Alberto Bueno penalty for Rayo.
Both sides finished with 10 men as Román Triguero collected a second yellow card for pulling down Suarez, conceding the penalty that allowed Messi to make it 3-0.
Barca defender Dani Alves was then dismissed 10 minutes from the end for tripping Bueno as he went through on goal.
|Reigning in Spain - La Liga's top scorers 2014-15|
|Lionel Messi (Barcelona)||30|
|Cristiano Ronaldo (Real Madrid)||30|
|Antoine Griezmann (Atletico Madrid)||14|
|Carlos Bacca (Sevilla)||14|
|Alberto Bueno (Rayo Vallecano)||13|
|Karim Benzema (Real Madrid)||13|
The Rayo striker took the penalty himself to move to 13 La Liga goals for season.
Messi now has 30 league goals, the same total as Real Madrid forward Cristiano Ronaldo, whose tally of 23 La Liga hat-tricks now trails Messi by one.
The 27-year-old Argentine, now also holds the record as the most prolific hat-trick scorer in Spanish football, with his 32 in all competitions eclipsing the total he previously shared with Telmo Zarra, who played most of his football for Athletic Bilbao from 1940-55.
Messi clocked up his latest record figures despite an anonymous first-half performance against mid-table Rayo, whose goalkeeper Cristian Alvarez produced an inspired performance to limit the damage.
Suarez opened the scoring with his 12th goal of the season after five minutes, steering the ball home from Xavi Hernandez's fine pass.
But after Pique had made it 2-0 early in the second half, following up after an Alves header had hit a post, Messi took over.
After his initial spot-kick was saved, the Argentina international was given a second opportunity because of encroachment into the penalty area and he drilled the ball home.
His second was a tap-in after a Suarez shot had been saved by Alvarez before a trademark shimmy took him round the Rayo goalkeeper to give him his 41st goal of the season in all competitions.
Barcelona are now one point ahead of Real Madrid and the two sides meet at the Nou Camp on 22 March.
Barcelona coach Luis Enrique:
"The objective is to be the leader when the season ends.
"I have always said the big teams will lose throughout the course of the season and it will continue to happen, therefore we have to be very careful."
- 22Alves da SilvaBooked at 80mins
- 18AlbaBooked at 57minsSubstituted forCorreiaat 69'minutesBooked at 90mins
- 14MascheranoBooked at 29minsSubstituted forRakiticat 60'minutes
- 8IniestaSubstituted forRafinhaat 65'minutes
- 1ter Stegen
- 20Roberto Carnicer
- 31El Haddadi
- 2Román TrigueroBooked at 54mins
- 10TrashorrasBooked at 56mins
- 21Sánchez RuizSubstituted forMarín Ruizat 65'minutes
- 22Pereira CarneiroSubstituted forAquinoat 69'minutesBooked at 84mins
- 19BaptistaoSubstituted forContreiras Gonçalvesat 81'minutes
- 3Martínez García
- 9Contreiras Gonçalves
- 17Marín Ruiz
- 24Pozuelo Melero
- 27Moreno Lopera
- Jesús Gil Manzano
- Shots on Target
Second Half ends, Barcelona 6, Rayo Vallecano 1.
Attempt missed. Manucho (Rayo Vallecano) left footed shot from outside the box is close, but misses to the right. Assisted by Gaël Kakuta.
Attempt saved. Luis Suárez (Barcelona) right footed shot from a difficult angle on the right is saved in the bottom right corner. Assisted by Lionel Messi with a through ball.
Goal! Barcelona 6, Rayo Vallecano 1. Luis Suárez (Barcelona) right footed shot from the right side of the six yard box to the bottom right corner. Assisted by Lionel Messi with a through ball.
Adriano (Barcelona) is shown the yellow card for a bad foul.
Foul by Adriano (Barcelona).
Alberto Bueno (Rayo Vallecano) wins a free kick on the left wing.
Offside, Barcelona. Rafinha tries a through ball, but Lionel Messi is caught offside.
Attempt missed. Lionel Messi (Barcelona) right footed shot from the right side of the six yard box is close, but misses to the right. Assisted by Luis Suárez following a fast break.
Foul by Adriano (Barcelona).
Javier Aquino (Rayo Vallecano) wins a free kick on the left wing.
Javier Aquino (Rayo Vallecano) is shown the yellow card for a bad foul.
Lionel Messi (Barcelona) wins a free kick in the attacking half.
Foul by Javier Aquino (Rayo Vallecano).
Attempt saved. Luis Suárez (Barcelona) left footed shot from the centre of the box is saved in the bottom left corner. Assisted by Ivan Rakitic.
Substitution, Rayo Vallecano. Manucho replaces Leo Baptistao.
Goal! Barcelona 5, Rayo Vallecano 1. Alberto Bueno (Rayo Vallecano) converts the penalty with a right footed shot to the high centre of the goal.
Dani Alves (Barcelona) is shown the red card.
Penalty conceded by Dani Alves (Barcelona) after a foul in the penalty area.