Arsenal's part in their fairytale was a collective, mind-numbing nightmare until Dennis Bergkamp, on as a late substitute, forced the winning goal deep into added time. Extraordinarily it was his first goal in the Champions' League for three years. The relief flared throughout the stadium.
Before that Arsenal had looked simply bewildered, running out of ideas against a team whose 1,000-strong travelling support were reduced to numbed silence by what they witnessed. To lose was an unnecessary cruelty to Thun even if the Arsenal manager Arsène Wenger was wholly ungracious in saying they did not "come out [and play] because they are Thun".
He also brushed aside remarks that their manager Urs Schonenberger had called him his role model by saying "next question" and brutally said that the visitors had missed the opportunity of a "big upset".
Nevertheless, Wenger was remarkably sanguine. "I would not have panicked if it had been 1-1 because we are capable of winning in Thun," he said.
Of course they are. They should be. After all, the budget for Thun, the club from the shores of the lake Thunersee, is Sfr5.1m (£2.2m). That is for every player, member of staff, running cost - and amounts to half of Thierry Henry's annual wages.
But Wenger's relaxed post-match mood contrasted sharply to the image of him on the touchline - after one chance went astray he sat slumped, headed bowed, rubbing his brow.
There was justice in Wenger's sense of indignation over Van Persie's dismissal, just before half-time, as he raised his foot high to collect a lofted pass and caught Alen Orman in the face. The defender later had several stitches put in the wound. It appeared inadvertent, and surely was, but the Polish referee Grzegorz Gilewski instantly showed the red card.
Arsenal were apoplectic. Wenger said that they would appeal against the three-game ban - but the Uefa rules do not allow that. "It was an unpleasant surprise and the wrong decision," the manager said.
It could also be argued that Gilewski made the wrong decision as early as the fourth minute, however, when only booking Kolo Touré for bringing down Mauro Lustrinelli, Thun's lone striker, as he ran through. Touré was the last man.
That came as Sol Campbell, captain in the absence of the injured Henry, and making his first start this season, strayed forward. Arsenal were out-of-sorts, edgy, over-eager to break the deadlock.
There was a Pires' curler, a poked shot from Van Persie, a thunder-strike of a free-kick from Touré. Cesc Fabregas slid one shot past a post and then Jose Antonio Reyes - who later limped off - sent in a powerful drive which slithered through the legs of the jittery Thun goalkeeper, Eldin Jakupovic. He recovered to grasp the ball before Fredrik Ljungberg bundled him over the line.
But Thun - who have knocked out Dynamo Kiev and Malmo to get this far - were not serial defenders. Their defence was pack-thread but they also counter-attacked cleverly.
Arsenal finally broke through six minutes after the restart with Gilberto jumping brilliantly at the far post to plant the firmest of headers, from Reyes's corner, beyond Jakupovic.
The relief was short-lived. Amazingly back came Thun and Touré only half-cleared straight to Nelson Ferreira, who immediately hooked the ball over a bemused Manuel Almunia - a stand-in for the suspended Jens Lehmann - to equalise. As Arsenal rocked, Tiago Bernardi then ballooned over.
Wenger protested that Arsenal could not break through simply because they "lacked a man". As the minutes slipped by he threw on all his attackers and just as it seemed it would never come, in came a long ball, from Touré, and Bergkamp tussled with a Thun defender. As the ball squirmed free the Dutchman steered it joyously into the net.
"It was a goal full of class, fight, determination," said Wenger. They were qualities lacking during the evening.
"We came here and knew that we were playing against a top European team," said Schonenberger. "Our goal was to take a point and I can honestly say we deserved one point. We earned it." And he was right.
Arsenal (4-4-2): Almunia; Lauren, Campbell, Touré, Cole; Ljungberg (Hleb, 81), Fabregas (Bergkamp, 72), Gilberto, Pires; Van Persie, Reyes (Owusu-Abeyie, 81). Substitutes not used: Poom (gk), Song, Senderos, Clichy.
FC Thun (4-5-1): Jakupovic; Orman, Hodzic, Milicevic, Goncalves; Ferreira, Bernardi, Aegerter, Adriano (Gelson, 57), Gerber (Leandro, 72); Lustrinelli (Faye, 87). Substitutes not used: Portmann (gk), Duruz, Spadoto.
Referee: G Gilewski (Poland).