Antoine Griezmann scored two goals and provided two assists as Barcelona staged a stunning last-gasp comeback before beating Granada 5-3 away after extra time on Wednesday to reach the semi-finals of the Copa del Rey.
Granada were 2-0 up with two minutes of normal time remaining thanks to strikes from Kenedy and Roberto Soldado in either half.
But Griezmann, who had surrendered the ball in the build-up to Soldado's goal, pulled Barca back into contention in the 88th minute and then set up Jordi Alba's stoppage-time equaliser with a glancing header which the defender nodded home.
The French forward gave Barca the lead 10 minutes into extra time and even though a Fede Vico penalty moments later restored parity, Frenkie de Jong put Barca back in front in the 108th before a stunning volley from Alba, served up by a cross from Griezmann, clinched the Catalans' place in the last four.
"Football is incredible," raved Barca coach Ronald Koeman after the eight-goal thriller.
"We had chances to win the game far sooner but we put in an enormous effort, at the end of the second half and in extra-time, showing the mentality of a real team."
Koeman has spoken of the importance of winning the Copa del Rey this season as his side's chances of catching La Liga leaders Atletico Madrid keep fading, and he backed up his words by naming a strong line up.
He fielded Lionel Messi, Griezmann and De Jong from the start and even picked Marc-Andre ter Stegen over usual Copa del Rey keeper Neto, although it counted for little as clinical Granada pounced on two Barca mistakes to take the lead.
Defender Samuel Umtiti lost possession on the left-hand side of his area and Alberto Soro quickly delivered a ball into the box which Brazilian midfielder Kenedy knocked past Ter Stegen from close range.
Veteran striker Soldado then latched on to a long ball from Angel Montoro, who had dispossessed Griezmann, easily beating Umtiti for pace before confidently slotting into the net.
The Frenchman made amends with his late goal which gave Barca a lifeline while Messi smacked the post moments later, the third time Barca had hit the woodwork, before Alba's headed equaliser.
Granada had one final chance to snatch a winner in the dying seconds of normal time when Colombian forward Luis Suarez raced clear but arrowed his shot inches wide of the far post.
Barca showed their class in the extra period as Granada's legs gave in, giving the Catalans another shot at the Copa, which they have won a record 30 times.
PSG beat Nimes and stay in the hunt in Ligue 1
Paris St Germain bounced back from last weekend's defeat with a comprehensive 3-0 home victory against bottom side Nimes to stay hot on Ligue 1 leaders Lille's heels on Wednesday.
Angel Di Maria, Pablo Sarabia and Kylian Mbappe found the back to put the French champions on 48 points from 23 games.
PSG, who slumped to a 3-2 defeat at Lorient last Sunday, trail Lille by three points and Olympique Lyonnais by one.
Nimes, who have lost nine of their last 11 games, have 15 points from 22 matches.
PSG were without the suspended Neymar but the Brazilian's absence was barely felt against a Nimes side who had little to offer.
Di Maria, who had not scored since last November, put the hosts ahead in the 18th minute after intercepting a poor backpass from Lamine Fomba.
Sarabia doubled the tally nine minutes from the break as he headed home from Di Maria's free kick.
Mbappe wrapped it up with a delightful curled shot after being set up by Leandro Paredes.
Exclusive! 'A lot to play for in the England series'
Rishabh Pant: Next poster boy of Indian cricket
Meet the top women's contenders at Australian Open
EPL: United hit nine; Saints and Arsenal end with nine