Barcelona survived a huge scare in the last 16 of the 2019-20 Copa del Rey as they beat third-tier side Ibiza 2-1 on Wednesday.
The Blaugrana, who won the tournament four seasons in a row before losing to Valencia in last season's final, went 1-0 down at the Estadi Municipal de Can Misses inside 10 minutes when Pep Caballe turned home from 12 yards.
With 20 minutes to go, the hosts were still ahead. But an Antoine Griezmann equaliser in the 72nd minute and a winner four minutes into injury time turned the game on its head to break Ibiza hearts and earn Quique Setien his second win from two in his new role as manager.
Barca have now reached the last 16 for 15 seasons running.
Setien opted to leave Lionel Messi out of the squad completely for Wednesday's action, but he still fielded a strong side:
In the 10th minute, though, the visitors found themselves 1-0 down to Caballe's opener.
Riqui Puig was beaten for pace down the left by Javi Perez after an Ibiza free-kick. Perez set himself well and delivered a low cross into the penalty spot, where Caballe side-footed home.
Eight minutes later, Ibiza had the ball in the net again after a quick break down the right. But goalscorer Angel Rodado was adjudged to have committed a foul in the build-up:
Barca dominated possession but could not find any rhythm, and the best chances for another goal before the break again came from Ibiza when Rai hit the post and Rodado forced a save out of Neto:
It was more of the same after the break as Barca were frustrated by a fiercely competitive home side.
Ivan Rakitic had two decent chances but both were squandered, and Ansu Fati simply could not get himself into the game as the rain came down.
Finally, though, Griezmann levelled 18 minutes from time with a low finish after Frenkie de Jong's immaculate through ball:
Extra time looked to be beckoning, especially when the referee denied decent Barca calls for a red card and a penalty, both for fouls on Fati:
But deep into stoppage time, Jordi Alba fed Griezmann down the left and the Frenchman beat German in the Ibiza goal to spare Barca's blushes.
Barcelona face a tough test in La Liga on Saturday when they visit Valencia. Ibiza, meanwhile, host Sanse in Segunda Division B on Sunday.