MADRID — Lionel Messi scored a brilliant hat trick as Barcelona survived Javier Mascherano's red card to claim a thrilling 5-4 win at Deportivo Coruna Saturday that put it three points clear at the top of La Liga. Real Madrid climbed to fourth after Gonzalo Higuain and Cristiano Ronaldo (penalty) struck in a 2-0 win at home to promoted Celta Vigo. Barca raced into a three-goal lead after 18 minutes in an action-packed clash at the Riazor. The home side, however, managed to pull two goals back before the Barcelona star Messi scored his second of the night to make it 4-2 at the break. In a frenetic start to the second half, Pizzi curled in a stunning 47th-minute free kick and Mascherano was harshly shown a second yellow card two minutes later. Barca coach Tito Vilanova reacted by replacing the excellent Cesc Fabregas, who provided three goal assists, with Xavi before Messi appeared to have killed the game when he made it 5-3 with a trademark run and clinical finish in the 77th minute, his 15th La Liga hat trick. A bizarre own goal from Barca full back Jordi Alba, when he lobbed keeper Victor Valdes from inside his own penalty area, gave Depor fresh hope but they were unable to make some late pressure count. Unbeaten Barca has 22 points from eight matches, three ahead of Atletico Madrid which was to play its game in hand at Real Sociedad Sunday. Malaga is third on 17 points after Joaquin made amends for missing a penalty with the winner in a 2-1 triumph at home to Real Valladolid. Valencia scored two late goals to snatch a 3-2 victory against struggling Athletic Bilbao who had Ander Herrera sent off midway through the second half. — Agencies