Antoine Griezmann scored a second-half stoppage time goal for Barcelona as the narrowly beat third-tier minnows Ibiza 2-1 in the round of 32 of the Copa del Rey on Wednesday night.
The goal was Griezmann's second of the night as Barca avoided what would have been a humiliating defeat after trailing at half-time.
Barcelona's new boss Quique Setien rested some of his top players like Lionel Messi, Gerard Pique and Sergio Busquets and found his rotated side trailing before 10 minutes when Pep Caballe finished off a nice team move by the minnows from the Spanish archipelago.
- WATCH! Copa del Rey Replay: Barcelona narrowly beat Ibiza
Barcelona failed to get a shot on target in the first 35 minutes, while Ibiza narrowly missed out on going two up just before the break when Rai Nascimento hit the post and Angel Rodado forced a save from Neto from the rebound as the hosts took their shock lead into the dressing room.
Griezmann said it was the switch to a 3-4-3 system that led to the slow start: "We didn't have a single shot in the first half, it was a new system and we had to get used to it.
"We have to build confidence with the ball, move more in attack, understand the coach's tactics. We did a good job, especially in the second half, and I have to thank my teammates for the passes that let me score. I had two chances and they went in."
The visitors ratcheted up the pressure as the second half began, but were still trailing as the game approached the hour mark and Setien brought on Jordi Alba for Carles Perez to help get Barcelona on the scoreboard.
Barca finally drew level in the 72nd minute thanks to Griezmann, who finished neatly from a Frenkie de Jong assist to make it 1-1 and set up a tense finish to the second half.
And with the match looking like it was headed to extra time, Griezmann popped up again to finish a quick-hitting counter-attack to send Barca through to the round of 16.
This year marks the first edition of the annual Spanish cup competition since it switched to a single-match format (stream all matches live on ESPN+).