Barcelona needed a rousing comeback and extra time to beat Granada, 5-3, and advance to the Copa del Rey semifinals on Wednesday.
Despite Barca dominating the opening half-hour, Granada scored totally against the run of play in the 33rd minute when a Samuel Umtiti giveaway in the Barca box led to a cross and easy tap-in finish for Newcastle loanee Kenedy.
- Barcelona ratings: Griezmann, De Jong epic in win
- Stream ESPN FC Daily on ESPN+ (U.S. only)\
The home side then doubled their advantage immediately after restart when veteran forward Roberto Soldado raced in behind the Barca defense and confidently beat Marc-Andre ter Stegen.
Ronald Koeman threw on Sergino Dest, Ousmane Dembele and Martin Braithwaite in hopes of turning his side's fortunes around.
Antoine Griezmann helped pull a goal back two minutes from time when his lunging poke of a lobbed Messi pass hit the post and then goalkeeper Aaron Escandell before crossing the line.
Messi hit the post moments later but Barca found a dramatic equaliser in the second minute of stoppage time. Jordi Alba nodded home Griezmann's cushioned header of another inch-perfect cross from Messi.
The game then went into extra time where Barca struck first through Griezmann but Fede Vico answered back from the penalty spot three minutes later after Dest barged down Carlos Neva in the area.
But Barca finally took the lead for good in the 108th minute -- Frenkie de Jong sweeping home after Escandell parried a right-footed shot from Messi into his path -- and then put the finishing touches on a satisfying win two minutes from time when Alba wonderfully volleyed home from an angle.