Lionel Messi scored two goals after coming on as a second half substitute on Sunday as Barcelona rallied for a 2-1 victory against Racing Santander to maintain its 12-point lead in the Spanish league. Barcelona, which finished the game with only nine players, fell behind to a 56th minute penalty converted by Nicolas Zigic at the El Sardinero stadium. But Messi scored with his first touch in the 65th minute, slotting home a loose ball at the near post, and the Argentina midfielder then volleyed the winner past goalkeeper Antonio Rodriguez in the 81st for the 5,000th goal in Barcelona's history. Barcelona, which has won nine straight games in a 20-match unbeaten run, leads with 56 points from 21 games. Real Madrid is second with 44 and Sevilla stayed on 38 after a 1-0 stunning loss to 10-man Sporting Gijon. Valencia is fourth with 37 points after beating Almeria 3-2. Coach Javier Aguirre's job could be on the line after Atletico remained winless in 2009 after a 2-1 loss to Valladolid. Valladolid went ahead in the 51st through Luis Prieto before Atletico equalized two minutes later, Diego Forlan's errant volley deflecting off Jose Garcia Calvo and into the goal. But Victor Fernandez's penalty in the 78th meant Atletico are winless in five games. In Sunday's other games, it was: Deportivo La Coruna 3, Villarreal 0; Espanyol 1, Recreativo Huelva 1; Real Betis 2, Getafe 2; and Osasuna 1, Mallorca 0. Beckham inspires Milan David Beckham created two goals as AC Milan thrashed Lazio 3-0 at Rome's Stadio Olimpico on Sunday to move into second place in Serie A. The victory allowed Milan to cut Inter Milan's lead at the top to six points after its bitter city rival was held to a 1-1 draw at home to lowly Torino. Beckham was chief orchestrator with pin-point crosses to create the first two goals before Kaka rounded off the scoring late on. Milan demonstrated its attacking intent on seven minutes when Marek Jankulovski took a pass from Kaka at pace into the box but Fernando Muslera was equal to his stinging shot. On 35 minutes Lazio had the first of two chances in quick succession as Goran Pandev curled his effort just past the angle of post and bar. The host was made to pay as Beckham escaped down the right and crossed perfectly for Pato to steer home, although there was more than a hint that the former England captain was offside. But only three minutes into the second period, Beckham punished Lazio's shoddy marking once again with a sumptuous delivery from a free-kick that Massimo Ambrosini gleefully headed home. Thereafter Milan repeatedly beat Lazio's hapless offside trap but both Pato and Kaka overran the ball before the latter then hit the outside of the post on his next escape. Lazio didn't learn their lessons though and once again Kaka got in behind the hosts' defense on 83 minutes before slotting home from an angle. After Juventus's shock 3-2 home defeat to Cagliari on Saturday, Inter could have gone nine points clear with victory but it missed a glut of chances. Genoa tightened its grip on fourth and the final Champions League qualifying place as Domenico Criscito scored two minutes from time to give it a 1-0 home win over Palermo. AS Roma's charge up the table was blunted at Reggina despite a brace from Chile midfielder Claudio Pizarro as it was held to a 2-2 draw. In other games it was: Atalanta 1, Catania 0; Bologna 0, Fiorentina 0; Chievo 1, Sampdoria 1 and Lecce 2, Siena 1.