Lionel Messi hit a record-breaking 24th Primera Division hat-trick as Barcelona went to the top of the table in style with a 6-1 win over Rayo Vallecano at the Nou Camp.

Luis Suarez opened the scoring with a goal in the fifth minute, and Gerard Pique doubled the lead shortly after the break, before Messi scored a treble inside 12 minutes that took him one hat-trick clear of Cristiano Ronaldo.

Both sides had their right-backs sent off, with Tito getting two yellow cards for Rayo and Dani Alves getting a straight red for bringing down Alberto Bueno, who scored a consolation goal for the visitors, only for Suarez to pounce again in stoppage-time.

This was a merciless performance from Luis Enrique's side, who go one point clear at the top of the table after Real Madrid lost at Athletic Bilbao on Saturday, reclaiming top spot for the first time in 2015.

Atletico Madrid remain third after they held off the challenge of fourth-placed Valencia to draw 1-1 at the Vicente Calderon.

The home side went ahead through Koke's 33rd minute effort, but Los Che came back through Shkodran Mustafi to grab a share of the spoils, despite the late sending off of Javi Fuego for a second yellow card.

Villarreal overcame Celta Vigo to win 4-1 and record an eighth straight home win in the Primera Division.

Giovani dos Santos opened the scoring in the 40th minute and Mateo Musacchio tightened the hosts' grip on the game just before the break.

Augusto Fernandez got Celta back into the game shortly after the restart but Luciano Vietto and Gerard Moreno both scored in the closing stages to put the game out of the Galicians' reach and bring their five-game unbeaten run to an end.

Elsewhere, a mistake by Espanyol goalkeeper Kiko Casilla proved to be costly as it set up Sergio Canales for the only goal of the game as Real Sociedad won 1-0 at Anoeta on Sunday.

Casilla's clearance in the 38th minute fell directly into the path of Canales, who gratefully accepted the gift and put David Moyes's side ahead.

It proved to be the decisive goal as despite an entertaining game, neither side was able to find the target again.

The result lifted La Real to 11th place in the overall La Liga standings.