Lionel Messi watches one of his three Sunday goals into the net. (Getty Images)
Lionel Messi watches one of his three Sunday goals into the net. (Getty Images)

Barcelona's Lionel Messi recorded his 24th La Liga hat trick in Sunday's 6-1 win over Rayo Vallecano, passing Real Madrid's Cristiano Ronaldo for most hat tricks in La Liga history, Squawka.com reports.

Messi scored three goals within 12 minutes in the second half of the victory, which returned Barcelona to the top of the table after Real Madrid fell 1-0 to Athletic Bilbao Saturday. Luis Suarez also recored a brace in the win.

In addition to setting the La Liga hat trick record, Messi became the sole record holder for most hat tricks in Spanish football history with 32, breaking a tie with longtime Athletic Bilbao forward Telmo Zarra.

The hat trick was the sixth of the season for Messi, who brought his goal tally up to 41 in the victory. He's the first player in Spanish football history to score 40 or more goals in six different seasons, ESPNFC.com reports.