Antoine Griezmann saved Barcelona from Copa del Rey humiliation as he scored a second-half double to see off Ibiza 2-1.
Having made an impressive start to his tenure with a dominant 1-0 win over Granada in which Barca had 82 per cent of possession, Setien rested Lionel Messi, Sergio Busquets and Gerard Pique for the trip to the Balearic island.
LaLiga's pacesetters enjoyed similar superiority in terms of time on the ball, but appeared on course for an incredible upset defeat to the Segunda B club, who took the lead through a goal credited to Josep Caballe inside 10 minutes.
Ibiza had chances to extend their advantage, but the hosts eventually ran out of steam and Griezmann levelled in the 72nd minute, before securing Barca's progression to the last 16 in the fourth minute of stoppage time.
The third-tier club opened the scoring with a goal that will serve as an indelible moment in their history in just the ninth minute of proceedings.
Rai Nascimento's pull-back from the left was met by Javi Perez who, after being allowed to ghost into the box by Riqui Puig, saw his shot deflected beyond Neto by Caballe.
Neto was beaten again eight minutes later, but Angel Rodado's effort was correctly chalked off for his push on Clement Lenglet.
Only the woodwork spared Barca further embarrassment as Rai's close-range effort hit the inside of the left-hand post and bounced out, with Neto palming Rodado's follow-up over the crossbar.
Barca grew more dangerous in the second half and they finally found a way through when Frenkie de Jong fed Griezmann and the France international slotted home in confident fashion.
Extra time looked an inevitability, but Barca were able to ensure they did not have to exert themselves for another half-hour as they found the winner in the fourth of six additional minutes.
Jordi Alba was this time the man to send Griezmann clear and he made no mistake with a near-post finish that broke the hearts of a raucous home crowd.
What does it mean? Setien's tinkering almost backfires
Setien unsurprisingly shuffled his pack for the cup encounter, but a back three of Sergi Roberto, Lenglet and Junior Firpo always looked vulnerable, and so it proved. Barca were fortunate not to fall further behind in the first half and can count themselves very lucky not to have suffered an almighty humbling.
A tale of two halves for Griezmann
Griezmann had the fewest touches (18) of any Barca player in the first half but he contributed the two most important ones of the second to leave Setien breathing a sigh of relief.
Puig caught napping
Brought on for Ivan Rakitic at the weekend as Barca sought the winner against Granada, Puig looks set for an increased role at Barca under Setien, but this was a learning experience for the 20-year-old. He was at fault for the opener and was ineffective at the other end of the pitch, failing to create a single chance.
Barca face a tricky trip to Mestalla to face Valencia on Saturday. For Ibiza, it's back to the challenge of earning promotion from Segunda B Group 1, in which they trail leaders Atletico Madrid 'B' by two points. Bottom club SS Reyes are next for Pablo Alfaro's men.