(CNN) -- It was far from vintage Barcelona, but it was enough to keep alive the Catalan club's dwindling hopes of retaining the Spanish league title. 

With white handkerchiefs waving in the Camp Nou to indicate the fans' frustration at what appeared to be another disappointing setback, Lionel Messi came to the rescue on Sunday to earn a 2-1 victory against Athletic Bilbao. 

Having been knocked out of the Champions League, then losing the Copa del Rey final to Real Madrid, Gerardo Martino's team had been staring down the barrel of an unthinkable fourth successive defeat. 

With Atletico Madrid having gone seven points clear at the top of the table with Friday's 2-0 win over Elche, it would've spelled disaster if Barca could not recover from Aritz Aduriz's opener for the fourth-placed Basques. 

The early signs weren't good. 

After Messi had a goal ruled out for offside, Aduriz hit the Barca woodwork with a spectacular overhead kick, then Alexis Sanchez smacked the Bilbao bar when it seemed easier to score. 

Aduriz ghosted through Barca's frail defense to slot in a low shot five minutes after the break, and teammate Markel Susaeta had an effort ruled out for offside soon after. 

To the home supporters' intense relief, Pedro provided the equalizer in the 72nd minute with his 15th league goal this season, diverting a low shot from Sanchez into the net from close range. 

Soon after that, Messi picked himself up after being fouled on the edge of the penalty area and fired a free-kick through the wall. 
Who did they lose the Copa del Rey final to?
osing the Copa del Rey final to Real Madrid