BARCELONA, Spain -- Lionel Messi ended Barcelona's run of three straight losses and kept it in the Spanish league title chase by scoring a late free kick to complete its 2-1 comeback win over Athletic Bilbao on Sunday.
Messi's 75th-minute goal answered some of the criticism the club's all-time leading scorer had received for his lacklustre performances in the team's recent losses in the league, Champions League and Copa del Rey final.
Barcelona was on its way to another defeat when Aritz Aduriz scored in the 50th, provoking a smattering of white handkerchiefs in the Camp Nou stands, but Pedro Rodriguez equalized when he slotted in Alexis Sanchez's scuffed strike in the 72nd.
Barcelona still needed defender Javier Mascherano to block Mikel Rico's point-blank try in injury time to protect the three points after Cristian Tello had wasted one of numerous opportunities to put the result beyond doubt.
"After the first half I thought that this wasn't to be our day after missing so many chances," said Barcelona coach Gerardo Martino, whose job probably depends on Barcelona catching Atletico to defend its title.
"But we kept fighting. We played with a lot of heart to overcome a difficult week and a game that had turned against us. Messi defends himself on the pitch and I am happy for him."
Barcelona moved provisionally into second place, four points behind leader Atletico Madrid. Madrid is two points behind Barcelona but with a game to play.
Messi set up his winner after earning a foul on the edge of the area, and the Argentina forward used his left foot to finally beat Gorka Iraizoz after the goalkeeper had denied him twice.
While not exactly his electrifying old self, Messi was active creating scoring chances from the start, but Alexis Sanchez sent Pedro's pass off the bar from close range in the 38th.
Barcelona's attack was working. Its defence, however, showed the same frailties that have plagued it in the second half of the season.
Aduriz's beautiful bicycle kick crashed into the post before goalkeeper Jose Pinto palmed away Markel Susaeta's follow-up at the half-hour mark.
The patience of Barcelona's fans began to fray when Bartra lost the ball near his area and Aduriz expertly drove the ball into the corner of the net.
And when Messi sent the ball wide one-on-one against Iraizoz a collective groan filled the stadium.
But Pedro was finally able to steer the ball in when Dani Alves began a move from the right flank to start Barcelona on its way to a much-needed victory.
"We knew that after all the opinions and criticism that we have received that we had to do our job and be professionals," Mascherano said. "We have to hold on to that small hope that if we win our games we can then see what happens. We can't just let (Atletico and Madrid) slip up and not be there."
Bilbao's loss put its hold on fourth place and the last Champions League in danger after Sevilla closed the gap to three points by thrashing Granada 4-0, with the Basques hosting the Andalusian side next round.
Sevilla, which opens its Europa League semifinal against Valencia on Thursday, eased past Granada thanks to Diego Mainz's own goal and goals by Kevin Gameiro, Stephane Mbia and Victor Machin.
Celta Vigo outclassed Almeria with a 4-2 away win as forward Manuel "Nolito" Agudo netted a double, and Paulao scored one goal and set up another, but both for the wrong team, as bottom-side Real Betis slumped to a demoralizing 3-1 defeat at Rayo Vallecano.
Celta kept Almeria in the relegation zone thanks to Nolito's brace and goals by fellow forwards Charles and Fabian Orellana, while Rafina set up two scores.
Paulao's nightmare began in the 14th when he left his back pass woefully short of reaching goalkeeper Adan Garrido, and Rochina Raixes poached the ball to roll it in.
The Brazilian defender followed that mistake by clearing a cross into his own net in the 27th.
Paulao asked to be substituted and was replaced five minutes later, with the Rayo fans in Vallecas Stadium politely applauding him to show their support.
Betis was left on the brink of relegation, 10 points from safety with four games to go.