Olivier Giroud scored his first hat-trick for Arsenal to ensure the Gunners qualified for the last 16 of the Champions League by beating Olympiakos.
Needing to win by two clear goals, the Gunners produced a performance of nerve and nous to finish second in Group F.
Giroud headed the opener in the first half, then stroked home the second after good work by Joel Campbell.
The French striker put Arsenal's qualification beyond doubt with his third from the penalty spot.
Listen to 5 live commentary on the goals
Who's in the Champions League last-16?
Wenger hails 'complete' display
'It's Houdini Wenger this evening'
Arsenal have never failed to reach the knockout stages of the Champions League since the start of the new format in 2003-04, and their experience on the biggest stage shone through on a memorable night in Athens.
They weathered the early enthusiasm from the physical home side, who were backed by typically partisan support, and slowly seized the initiative with a composed performance.
Mathieu Flamini had already hit the bar before Giroud opened the scoring with a near-post header from Aaron Ramsey's cross, which went in off the goalkeeper Roberto.
The second was the best goal of the night as Giroud won a flick-on on the halfway line and timed his run into the box to perfection before stroking home.
The third was slightly more fortuitous as Omar Elabdellaoui was penalised for handling Nacho Monreal's shot and Giroud stepped up to convert with ease.
It's got to be Olivier Giroud for the way he applied the finishing touches to an accomplished team performance.
However, special mention must go to Joel Campbell who held off three defenders before taking out another two with a cute pass for Giroud's second goal.
Time and again, Campbell showed strength to hold off his marker and vision to slide in Giroud to offer hope to Arsenal fans that they have the makings of a fine strike partnership.
Gunners fans will also be cheered to see Theo Walcott starting the game, and while the England forward clearly lacked match fitness he made some clever runs and looked dangerous both out wide and when he drifted inside.
Arsenal did well just to qualify after chastening defeats by both Dinamo Zagreb (2-1 away) and Olympiakos (3-2 at home) meant they had failed to register a single point in the group after two matches.
They went on to be defeated 5-1 by group winners Bayern Munich in Germany too, after winning 2-0 against Pep Guardiola's team at home.
The fact they finished second to Bayern means they are likely to get a tougher last-16 draw than the German side.
Their potential opponents when the draw is made are Spain's Real Madrid, Atletico Madrid and Barcelona, Wolfsburg from Germany or Russian side Zenit St Petersburg.
They will join fellow Premier League sides Chelsea and Manchester City in Monday's last-16 draw at 11:00 GMT.
Full Time Match ends, Olympiakos 0, Arsenal 3.
90:00 +4:04 Full timeFull Time Second Half ends, Olympiakos 0, Arsenal 3.
90:00 +2:21Corner, Arsenal. Conceded by Manuel da Costa.
90:00 +2:18Attempt blocked. Alex Oxlade-Chamberlain (Arsenal) left footed shot from outside the box is blocked. Assisted by Mesut Özil.
90:00 +1:24 SubstitutionSubstitution Substitution, Arsenal. Calum Chambers replaces Olivier Giroud.
90:00 +0:49 SubstitutionSubstitution Substitution, Arsenal. Alex Oxlade-Chamberlain replaces Joel Campbell.
90:00 +0:02Joel Campbell (Arsenal) wins a free kick in the defensive half.
90:00 +0:02Foul by Konstantinos Fortounis (Olympiakos).
88:40Corner, Olympiakos. Conceded by Petr Cech.
86:48Foul by Mathieu Flamini (Arsenal).
86:48Konstantinos Fortounis (Olympiakos) wins a free kick in the defensive half.
86:05Corner, Arsenal. Conceded by Manuel da Costa.
85:41 SubstitutionSubstitution Substitution, Olympiakos. Alfred Finnbogason replaces Felipe Pardo.
83:19Hand ball by Konstantinos Fortounis (Olympiakos).
82:02Offside, Arsenal. Mathieu Flamini tries a through ball, but Mesut Özil is caught offside.
81:34Corner, Arsenal. Conceded by Manuel da Costa.
81:21Attempt saved. Mesut Özil (Arsenal) left footed shot from outside the box is saved in the bottom right corner.
80:37Mesut Özil (Arsenal) wins a free kick on the right wing.
80:37Dangerous play by Dimitrios Siovas (Olympiakos).
78:25Olivier Giroud (Arsenal) wins a free kick in the attacking half.
Foul by Manuel da Costa (Olympiakos).
76:16 SubstitutionSubstitution Substitution, Olympiakos. Hernâni replaces Sebá.
75:02Foul by Per Mertesacker (Arsenal).
75:02Alejandro Domínguez (Olympiakos) wins a free kick in the attacking half.
74:28Offside, Arsenal. Joel Campbell tries a through ball, but Olivier Giroud is caught offside.
72:29Foul by Joel Campbell (Arsenal).
72:29Sebá (Olympiakos) wins a free kick in the defensive half.
71:56 SubstitutionSubstitution Substitution, Arsenal. Kieran Gibbs replaces Theo Walcott.
71:19Attempt missed. Manuel da Costa (Olympiakos) header from the centre of the box misses to the right. Assisted by Felipe Pardo with a cross following a corner.
71:09 SubstitutionSubstitution Substitution, Olympiakos. Alejandro Domínguez replaces Pajtim Kasami.
70:50Corner, Olympiakos. Conceded by Nacho Monreal.
66:02 Goal scoredGoal! Goal! Olympiakos 0, Arsenal 3. Olivier Giroud (Arsenal) converts the penalty with a left footed shot to the bottom left corner.
65:08 BookingBooking Omar Elabdellaoui (Olympiakos) is shown the yellow card for hand ball.
65:03Penalty conceded by Omar Elabdellaoui (Olympiakos) with a hand ball in the penalty area.
65:00Attempt blocked. Nacho Monreal (Arsenal) left footed shot from the left side of the box is blocked. Assisted by Olivier Giroud.
64:06Attempt saved. Pajtim Kasami (Olympiakos) left footed shot from outside the box is saved in the bottom left corner. Assisted by Felipe Pardo with a headed pass.
63:11Hand ball by Mathieu Flamini (Arsenal).
62:07 BookingBooking Olivier Giroud (Arsenal) is shown the yellow card for a bad foul.
62:01Foul by Olivier Giroud (Arsenal).
62:01Felipe Pardo (Olympiakos) wins a free kick on the right wing.
59:15Delay over. They are ready to continue.
58:10Delay in match Laurent Koscielny (Arsenal) because of an injury.
58:10Delay in match Luka Milivojevic (Olympiakos) because of an injury.
57:05Corner, Olympiakos. Conceded by Petr Cech.
57:04Attempt saved. Konstantinos Fortounis (Olympiakos) left footed shot from outside the box is saved in the top left corner. Assisted by Omar Elabdellaoui.
55:38Corner, Arsenal. Conceded by Arthur Masuaku.
55:36Attempt blocked. Theo Walcott (Arsenal) right footed shot from the right side of the box is blocked. Assisted by Joel Campbell with a cross.
54:59Corner, Arsenal. Conceded by Arthur Masuaku.
54:11Laurent Koscielny (Arsenal) wins a free kick in the defensive half.
54:11Foul by Felipe Pardo (Olympiakos).
52:29Foul by Olivier Giroud (Arsenal).
52:29Manuel da Costa (Olympiakos) wins a free kick in the defensive half.
51:43Theo Walcott (Arsenal) wins a free kick in the attacking half.
51:43Foul by Luka Milivojevic (Olympiakos).
50:59Attempt saved. Dimitrios Siovas (Olympiakos) header from the centre of the box is saved in the centre of the goal. Assisted by Brown Ideye with a headed pass.
50:34Corner, Olympiakos. Conceded by Nacho Monreal.
48:53 Goal scoredGoal! Goal! Olympiakos 0, Arsenal 2. Olivier Giroud (Arsenal) left footed shot from the centre of the box to the bottom right corner. Assisted by Joel Campbell with a through ball.
47:44Delay over. They are ready to continue.
46:42Delay in match Olivier Giroud (Arsenal) because of an injury.
45:38Corner, Olympiakos. Conceded by Per Mertesacker.
45:00Second Half begins Olympiakos 0, Arsenal 1.
45:00 +0:04 Half timeHalf Time First Half ends, Olympiakos 0, Arsenal 1.
43:54Attempt missed. Omar Elabdellaoui (Olympiakos) right footed shot from outside the box is high and wide to the right following a set piece situation.
43:09Foul by Aaron Ramsey (Arsenal).
43:09Arthur Masuaku (Olympiakos) wins a free kick in the attacking half.
40:43Attempt saved. Arthur Masuaku (Olympiakos) left footed shot from outside the box is saved in the bottom right corner. Assisted by Konstantinos Fortounis with a headed pass.
39:47Attempt missed. Arthur Masuaku (Olympiakos) left footed shot from outside the box misses to the left following a corner.
39:15Corner, Olympiakos. Conceded by Laurent Koscielny.
38:19Offside, Arsenal. Héctor Bellerín tries a through ball, but Joel Campbell is caught offside.
37:06Attempt missed. Theo Walcott (Arsenal) right footed shot from outside the box misses to the left.
36:39Offside, Arsenal. Nacho Monreal tries a through ball, but Joel Campbell is caught offside.
35:40Foul by Olivier Giroud (Arsenal).
35:40Pajtim Kasami (Olympiakos) wins a free kick in the defensive half.
34:38Corner, Arsenal. Conceded by Omar Elabdellaoui.
33:45Laurent Koscielny (Arsenal) wins a free kick in the defensive half.
33:45Foul by Luka Milivojevic (Olympiakos).
30:55Attempt missed. Dimitrios Siovas (Olympiakos) header from the centre of the box is too high. Assisted by Felipe Pardo with a cross following a corner.
30:18Corner, Olympiakos. Conceded by Nacho Monreal.
28:08 Goal scoredGoal! Goal! Olympiakos 0, Arsenal 1. Olivier Giroud (Arsenal) header from the centre of the box to the bottom left corner. Assisted by Aaron Ramsey with a cross.
27:03Dangerous play by Nacho Monreal (Arsenal).
27:03Pajtim Kasami (Olympiakos) wins a free kick in the defensive half.
25:48Foul by Olivier Giroud (Arsenal).
25:48Manuel da Costa (Olympiakos) wins a free kick in the defensive half.
24:18Attempt saved. Olivier Giroud (Arsenal) header from the centre of the box is saved in the bottom right corner. Assisted by Nacho Monreal with a cross.
24:02Attempt blocked. Mathieu Flamini (Arsenal) right footed shot from the centre of the box is blocked. Assisted by Joel Campbell.
22:28Foul by Olivier Giroud (Arsenal).
22:28Luka Milivojevic (Olympiakos) wins a free kick in the defensive half.
21:19Attempt missed. Pajtim Kasami (Olympiakos) right footed shot from outside the box misses to the right. Assisted by Arthur Masuaku.
19:39Attempt missed. Sebá (Olympiakos) right footed shot from outside the box is close, but misses the top right corner.
19:36Attempt blocked. Felipe Pardo (Olympiakos) left footed shot from the right side of the box is blocked. Assisted by Luka Milivojevic.
18:44Joel Campbell (Arsenal) wins a free kick in the defensive half.
18:44Foul by Pajtim Kasami (Olympiakos).
18:12Foul by Mathieu Flamini (Arsenal).
18:12Arthur Masuaku (Olympiakos) wins a free kick in the defensive half.
17:29 BookingBooking Aaron Ramsey (Arsenal) is shown the yellow card for a bad foul.
17:28Foul by Aaron Ramsey (Arsenal).
17:28Konstantinos Fortounis (Olympiakos) wins a free kick in the defensive half.
15:16Mesut Özil (Arsenal) wins a free kick in the defensive half.
15:16Foul by Manuel da Costa (Olympiakos).
11:24Joel Campbell (Arsenal) wins a free kick in the defensive half.
11:24Foul by Luka Milivojevic (Olympiakos).
9:08Foul by Mathieu Flamini (Arsenal).
9:08Pajtim Kasami (Olympiakos) wins a free kick in the defensive half.
8:41 BookingBooking Konstantinos Fortounis (Olympiakos) is shown the yellow card.
8:37Konstantinos Fortounis (Olympiakos) has gone down, but that's a dive.
8:29Attempt blocked. Felipe Pardo (Olympiakos) right footed shot from outside the box is blocked. Assisted by Konstantinos Fortounis.
7:32Foul by Héctor Bellerín (Arsenal).
7:32Sebá (Olympiakos) wins a free kick on the left wing.
1:14Offside, Olympiakos. Brown Ideye tries a through ball, but Felipe Pardo is caught offside.
0:00First Half begins.
0:00Lineups are announced and players are warming up.
Live data and text provided by our data suppliers