Arsenal avoided a shock Europa League exit at the hands of Ostersund despite losing 2-1 to the Swedish minnows at the Emirates Stadium tonight.
Ostersund, who fell to a 3-0 defeat in the first leg last week, scored twice in the space of a minute in the first half to breathe new life into the last-32 tie.
Hosam Aiesh's shot was deflected into his own net by Calum Chambers after 22 minutes and moments later Ken Sema lashed home a second for the visitors.
Sead Kolasinac eased some home nerves with a close-range finish just after half-time and Arsenal saw out the game to win 4-2 on aggregate.
After building a commanding 3-0 lead in last week's first leg in Sweden, Arsene Wenger's Gunners appeared to be coasting into the next round, only for two goals in 70 first-half seconds to send a half-empty Emirates Stadium into panic.
A Calum Chambers own goal and a neat finish from Ken Sema had Graham Potter's side two goals up at half-time - and the hosts were jeered off by a restless, if reduced, crowd.
Sead Kolasinac thumped home a response early in the second half to mark his first start since New Year's Eve with a vital goal.
That was as good as it got for a disjointed Arsenal outfit, who now face an altogether different test when they face Manchester City in the Carabao Cup final on Sunday.
Wenger and his players will be left red-faced following a performance which was another low point for a side already struggling in the Premier League and out of the FA Cup.
On the eve of the contest, Potter had said that to progress his team would need the biggest miracle in the history of football, but the visiting fans were dreaming of just that as they rattled Arsenal in the early stages.
They were rewarded for a positive start - in such stark contrast to their defensive approach in the first 20 minutes last week - when Chambers deflected Hosam Aiesh's low shot past David Ospina.
If that gave them hope, just a minute later they were given a real possibility when Chambers was out-muscled by Sema before the latter thrashed home to stun the Emirates.
Arsenal had offered very little in attack, Danny Welbeck flicking a header straight at Aly Keita, the Ostersund goalkeeper who was so shaky in the reverse leg, as the Gunners struggled to rouse themselves.
Ostersund were still enjoying the odd venture forward and Saman Ghoddos worked Ospina with a long-range free-kick after Jack Wilshere had fired high and wide at the other end.
Arsenal reacted immediately after the break, Kolasinac controlling and thrashing home with his right after Ronald Mukiibi fluffed his lines trying to clear Hector Bellerin's cross.
Mohamed Elneny stung the palms of Keita as Arsenal went in search of parity on the night, with Welbeck heading straight at the goalkeeper when well-placed.
There were still some unsettling moments for Wenger, as Ostersund substitute Dino Islamovic turned a low cross inches wide while the visitors chased the two goals they required.