A review of the weekend's action in the Spanish Primera Division.
Lionel Messi hit a hat-trick to become Barcelona's all-time top scorer as the Catalan club cruised to a commanding 7-0 win over Osasuna.
The 26-year-old opened the scoring after 19 minutes to equal Paulino Alcantara's record of 369 goals in all competitions - including friendlies - for Barcelona. Alexis Sanchez and Andres Iniesta increased the hosts' advantage before the break.
Messi struck again in the second half to move onto 370 goals and become the club's undisputed top marksman, and then completed his treble with a simple finish in the 87th minute, after substitute Cristian Tello had rammed in the fifth goal.
There was still time for a seventh goal, however, Messi adding an assist to his goal haul by teeing up Pedro.
Real Sociedad closed to within five points of the Champions League places by beating Juan Antonio Pizzi's Valencia 1-0 at Anoeta.
A 61st-minute goal from Imanol Agirretxe settled a match of few chances and boosted Real Sociedad's hopes of catching Basque rivals Athletic Bilbao.
Valencia, meanwhile, slipped eight points behind seventh-placed Sevilla in their quest to reach the Europa League.
Sevilla had earlier produced the perfect response to their Europa League loss to arch-rivals Real Betis with a convincing 4-1 win over Real Valladolid that boosts their dreams of a top-four finish.
Hopes of progressing to the Europa League quarter-finals this season could have been sunk following Thursday's 2-0 home defeat to Betis, but Sevilla's league form could yet see them playing Champions League football next season.
A brace from Kevin Gameiro, one a penalty, plus further goals from Ivan Rakitic - also from the spot - and Diogo Figueiras earned them victory over Real Valladolid and improved their winning streak in La Liga to four matches.
It also lifted them to within seven points of fourth-placed Athletic Bilbao, who face a tough trip to fifth-placed Villarreal on Monday night.
Bottom side Real Betis claimed a much-needed point from a goalless draw against Elche at Martinez Valero.
Fran Escriba's hosts had the better of the opportunities to force an opener in the first half but their opponents gave as good as they got.
The draw extended Betis' unbeaten run to five games in all competitions, leaving them nine points from safety, while the point moves the hosts up one place to 13th.
On Saturday, Cristiano Ronaldo's first-half score was the only difference between Real Madrid and Malaga as Carlo Ancelotti's side claimed a 1-0 win at Estadio La Rosaleda.
The Portugal international fired home a low strike after beating three Malaga defenders in the 23rd minute to claim a narrow victory for Real.
Atletico Madrid remain hot on the heels of their city rivals following a 1-0 victory over Espanyol at the Estadio Vicente Calderon.
Diego Costa netted the only goal of the game as Atletico kept the pace at the top to sit three points below Real, who earlier beat Malaga by the same scoreline.
Despite a late onslaught, the visitors could not find an equaliser and the defeat leaves them ninth after just one win in their last four league games.
Atletico won the game 10 minutes into the second period when Costa picked up David Villa's cross from the left and made no mistake as he curled it into the bottom of the net from 12 yards out for his 29th goal of the season.
Rayo Vallecano climbed out of the relegation zone by comfortably beating fellow strugglers Almeria 3-1 to record their third straight league win.
Alberto Bueno gave the hosts the lead on 37 minutes and Joaquin Larrivey extended the advantage 20 minutes later.
Fernando Soriano then gave Almeria a brief glimmer of hope with a powerful finish, but Larrivey struck again to secure another vital victory for Paco Jemez's side.
Celta Vigo took a big step towards securing their survival with a narrow but vital 1-0 victory at Levante.
Nolito scored the only goal of the game after 19 minutes and Celta were fortunate not to lose their lead in the second half, with Levante's David Barral missing a penalty and then having a shot blocked on the goalline by Celta goalkeeper Yoel Rodriguez, which looked as if it may have crossed the line.
On Friday night, Getafe let the lead slip three times as they were held 3-3 by 10-man Granada in an entertaining encounter at the Coliseum Alfonso Perez.
Playing under new coach Cosmin Contra, the home side looked likely to end a winless run stretching back to November when they went ahead first through Ciprian Marica, then Lisandro Lopez and finally Angel Lafita.
But Granada, who had Manuel Iturra sent off, answered every time and goals from Ivan Riki and Youssef El Arabi (two) secured a draw which keeps them three points above their opponents.