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 started a move from the right flank to start Barcelona on its way to a much-needed victory.

Messi set up his winner after earning a foul on the edge of the area by dribbling through Bilbao's backline, and the Argentina forward used his left foot to finally beat Gorka Iraizoz after the goalkeeper had denied him twice.

The Agrentine's goal answered some of the criticism the club's all-time leading scorer had received for his lackluster performances in the team's recent losses in the league, Champions League and Copa del Rey final.

Messi regaining form

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 minute.

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.

Barcelona moved provisionally into second place, four points behind leader Atletico Madrid. Madrid are two points behind Barcelona but with a game to play.

"We have to hold on to that small hope that if we win our games we can then see what happens," Mascherano said.