Olivier Giroud grabbed a superb hat-trick as Arsenal crushed Olympiakos Piraeus 3-0 to book their spot in the Champions League's last 16 with a classy demolition job that ended the hopes of their Greek opponents on Wednesday.
With Arsenal needing an emphatic victory to make it out of Group F, France forward Giroud produced a high-calibre display of finishing to ensure the English club finished second, level on nine points with Olympiakos, but ahead by virtue of their better head-to-head record.
Giroud opened the scoring in Greece with a powerful header in the first half, doubled Arsenal's advantage with a calm left-footed finish quickly after the restart and rounded off a superb individual display with a penalty.
"It's fantastic for me and for the team," the French striker told BT Sport.
"We are really pleased. It's nice to go through because we were not in a good position and finally we have done it. We feel relieved tonight."
The victory completed a remarkable turnaround in fortunes for Arsenal who lost three of their first four games of the campaign and needed to win by any result other than 1-0 or 2-1 in their decisive group clash to finish second behind group winners Bayern Munich.
In what was a straight shootout for the second spot in the group at the Georgios Karaiskakis stadium, Giroud opened the scoring with a stooping header from Aaron Ramsey's cross just before the half-hour.
Olympiakos responded to going behind positively, however, and finished the first half stronger. Felipe Pardo's cross was deflected over by Laurent Koscielny and Arthur Masuaku tested Arsenal keeper Petr Cech with a long-range drive.
Arsenal grabbed the vital second goal shortly after the restart as Giroud benefitted from Joel Campbell's trickery to latch onto the Costa Rica forward's neat pass and side-foot past Olympiakos keeper Roberto four minutes after halftime.
While Arsenal controlled possession, they did look vulnerable on the break and the hosts almost hit back immediately.
An unmarked Manuel Da Costa headed a corner straight at Cech, who shortly afterwards made a superb flying save to deny the impressive Kostas Fortounis.
Any hope of a comeback from the hosts though was extinguished when Italian referee Nicola Rizzoli awarded a penalty against Omar Elabdellaoui for handling Nacho Monreal's shot, with Giroud sending Roberto the wrong way from the spot.
The win preserved Arsenal's superb record in the Champions League, having now qualified for the competition's second stage for the 16th time in succession.
"I told you before that it would be the greatest escape," Arsenal manager Arsene Wenger said.
"I must say I'm very proud of the team as we had to be right on the mental and tactical side."
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)