MADRID  - Lionel Messi hit his 21st Barcelona hat-trick as his 10-man side edged a thrilling 5-4 victory at Deportivo La Coruna on Saturday.

Jordi Alba and Cristian Tello got the other goals for Barca, who had Javier Mascherano sent-off on 48 minutes, while a Pizzi double, a Alex Bergantinos strike and an Alba own goal kept the home side in the game.

The win means Barca go three points clear of Atletico Madrid, who play on Sunday, at the top of La Liga. Messi now has 11 league goals, two more than Cristiano Ronaldo who earlier scored for Real Madrid in a 2-0 win over Celta Vigo that kept Madrid eight points behind the Catalan side. Barca coach Tito Vilanova was relieved to win the game afterwards.

"We'll take the positives from that. The three points, lots of goals and we controlled the game with 10 men for a long time. The game was a bit crazy and Leo (Messi) has travelled a long way this week but he was still incredible," he said.

Meanwhile Deportivo coach Jose Luis Oltra had mixed feelings on the defeat. "It's a strange result, we let in 5 goals, but we scored 4 and against Barca, I think the fans will be happy with our performance and they were spectacular, especially when we were 3 down, we'll keep trying to achieve things for them," he said.

Alba put Barca ahead on the north-west coast after only two minutes, bursting into the area to meet a Cesc Fabregas pass and finish well. Five minutes later, the lead was doubled.

Messi dinked the ball out wide for Tello who moved from right to left and then back to his right foot before hitting an unstoppable shot past Dani Aranzubia in the Deportivo goal.

Barca's third, 10 minutes later was the pick of the evening.

Mascherano played a forward pass from the halfway line that Fabregas controlled and back-heeled into the path of Messi who powerfully struck a left-footed shot into the top right hand corner. Deportivo had been undone by Barca's clever passing play in less than 20 minutes but came back quickly to earn a dubious penalty when Mascherano fouled Riki on 25 minutes. Pizzi converted it.

Then, on 37 minutes, Bergantinos hit a shot from the edge of the area that Victor Valdes seemed to have covered but suddenly fumbled over the line to make it 2-3. Barca appeared stunned, only for Fabregas to then conjure up another brilliant pass for Messi to finish, this time with his right foot, to regain a two-goal cushion at the break.

Deportivo however were not finished. Within two minutes of the restartn Pizzi had smashed in his second from a free-kick.