BARCELONA — Lionel Messi scored a hat trick to help Barcelona rout Rayo Vallecano 6-1 at home and take the lead of the Spanish league Sunday. Barcelona capitalized on Real Madrid's latest slip to move one point ahead with the fierce rival set to meet at Camp Nou in two weeks. Luis Suarez got Barcelona going in the sixth minute with this first of two goals before Gerard Pique doubled the lead after halftime. Messi then struck his treble in a 13-minute span, starting with a penalty after Roberto “Tito” Triguero received his second booking. He scored twice more to equal Cristiano Ronaldo's tally of 30 league goals. Barcelona also finished with 10 when Dani Alves saw red for fouling Alberto Bueno, who converted the late penalty. Suarez then scored in stoppage time. It was Messi's 32nd hat trick for Barcelona and set a new Spanish record. The Argentine went one ahead of former Athletic Bilbao great Telmo Zarra. Cristiano Ronaldo has notched up 27 for Real Madrid. On Saturday, Spanish league leader Real Madrid lost 1-0 at Athletic Bilbao Saturday, stumbling for a second straight week. Aritz Aduriz rose to head in the only goal in the 26th minute, and strike partner Inaki Williams outshone Madrid's star-studded attack led by Cristiano Ronaldo. The Ballon d'Or holder was left without a shot on goal, as Madrid's best chance came toward the end when Gareth Bale's long lob hit the post. Madrid had drawn at home to Villarreal in the previous round. “We gave the game away,” Madrid manager Carlo Ancelotti said. In contrast with the better-rested visitors, Bilbao's victory came three days after it advanced to the Copa del Rey final against Barcelona. Bilbao rose to eighth place. Elsewhere, forward Victor “Vitolo” Machin scored twice, earned a penalty, and provoked an own goal to lead fifth-place Sevilla's entertaining 4-3 win at Deportivo La Coruna. Less than three months ago, Madrid was unbeatable, finishing 2014 with a Spanish record 22-game winning streak. Since then, injuries, tired first-choice players, and tougher competition have brought the European champions down to earth. Since the winter break, Madrid has lost three times and drawn once in 11 league games, and has also exited the Copa del Rey. It hosts Schalke Tuesday in the Champions League looking to make good on its 2-0 lead in their round-of-16 tie. Granada also beat Malaga 1-0 at home to move closer to escaping the relegation zone. Elche edged Almeria 1-0 at home to emerge from the drop zone and push Almeria down into the bottom three teams threatened to fall come season's end. — Agencies