Lionel Messi broke Athletic Bilbao's hearts with a late free kick as Barcelona's big guns kept their Copa del Rey hopes alive.
Messi struck with 12 minutes remaining at the Nou Camp to seal a 3-1 win on the night and a 4-3 aggregate victory to ensure Luis Enrique's men made it to the last eight.
Barca went into the second leg trailing 2-1 and knowing failure to end a run of two games without victory would spell disaster in front of a crowd of 71,445.
However, Luis Suarez cancelled out Bilbao's advantage with his 100th goal for the club before the break and Neymar struck from the penalty spot after the restart before Enric Saborit pulled one back.
Messi's contribution ultimately sealed victory with a goal which means he, Suarez and Neymar have now scored a staggering 302 between them since joining forces.
It proved to be a frustrating opening to the game for the home side as Suarez, Neymar and Jordi Alba repeatedly found themselves stopped in their tracks by the offside flag.
After Sergi Roberto had missed the target with a seventh-minute effort, Suarez thought he had levelled the tie only for his 25th-minute effort to be ruled out as he once again fell foul of the assistant referee.
Even Messi was unable to find his usual deft touch, sending free kicks over the bar after 32 and 42 minutes, but in the meantime, Suarez had made the breakthrough in spectacular style, volleying home from Neymar's cross to open the scoring on the night.
Barca doubled their lead within three minutes of the restart when, after Neymar had been fouled inside the box by central defender Eneko Boveda, he dusted himself off and scored from the spot.
However, Bilbao were back in it with 51 minutes on the clock when Saborit headed substitute Gorka Elustondo's far-post cross past keeper Jasper Cillessen.
Athletic sensed an opportunity and pressed the hosts back, but it took an important 61st-minute block by Gorka Iraizoz to deny Alba, and the keeper had to save from Neymar two minutes later with the home side responding.
But with 12 minutes remaining, Messi finally found his range, curling a free kick past Gorka and in off the post to snatch victory.