Last updated on .From the section European Football

Lionel Messi scored a sublime goal as Barcelona overcame lowly Almeria to reclaim second spot in La Liga and move one point behind leaders Real Madrid.

Messi scored with a delightful curling 25-yard free-kick to make it 2-0 after Alexis Sanchez had opened the scoring.

But Barca's recent defensive problems again surfaced when Angel Trujillo took advantage of poor marking to score.

Carles Puyol's made it 3-1 after Messi's header came back off the bar before Xavi thumped home the fourth.

The result marked a return to winning ways for Gerardo Martino's reigning champions after a surprise 3-1 defeat at Real Sociedad allowed Real Madrid to open up a three-point lead at the summit.

But with the Madrid derby having ended in a thrilling 2-2 draw, Barca have reduced Real's lead to a single point with 12 matches remaining.

Neymar was the most wasteful as Barcelona struggled to finish off Almeria before their late flourish.

They could have won by an even more handsome margin in what was a one-sided contest.

After establishing a 2-0 lead in the opening 24 minutes, they wasted a string of chances before turning on the style in the closing stages to score two goals in six minutes.

A team with more quality than Almeria, who are fighting to avoid relegation, might have made the reigning champions pay for their careless finishing.

In truth, Barcelona never looked in danger of throwing away their lead even when Trujillo scored.

There were nine minutes on the clock when Barca took the lead, Sanchez netting his 16th league goal after Cesc Fabregas's low shot was parried into his path by keeper Esteban.

It was 2-0 in the 24th minute thanks to a delicious free-kick from Messi, the Argentina international finding the target with a well-executed 25-yard set-piece.

Barca's key remaining games 23 March: v Real Madrid (away) 18 May: v Atletico Madrid (home)

Yet Barca's defensive wobbles allowed Almeria back into the game.

Having conceded three against Sociedad in the last game, Trujillo was left unmarked to head home from a corner.

Neymar wasted two glorious chances to put the game out of Almeria's reach before defender Puyol scored his first league goal of the season after Messi's header had cannoned off the bar.

Almeria conceded another when Xavi lashed home from 22 yards as Barca scored four goals or more in a league game for the 11th time this season.