Arsenal finished top of Champions League Group A thanks to a Lucas Perez hat-trick in Basel and Paris St-Germain’s draw with Ludogorets Razgrad.
PSG would have sealed top spot with victory, with anything less allowing in the Gunners, who took control through two tap-ins from Perez.
Perez drove in his third from the edge of the box and Alex Iwobi rolled in a fourth before Seydou Doumbia cut through for a Basel consolation, ending the game at 4-1.
While there is the unwelcome possibility of meeting Bayern Munich, Real Madrid or Borussia Dortmund in the last 16, Arsene Wenger took heart from ending as section winners.
“We can still have a difficult draw, so it will still be difficult, but you go forward with less guilt when you finish first,” said the Arsenal manager.
The result also left Basel rock bottom in the group, concluding their European journey prematurely. Ludogorets Razgard, who drew with PSG in thrilling fashion, would move to play in the Europa League.
PSG needed to win or match Arsenal’s result, but trailed twice after goals from Virgil Misidjan and Wanderson. Edinson Cavani’s overhead kick levelled at 1-1, and a 92nd-minute strike from Angel di Maria rescued a point at 2-2.
But the French champions squandered 25 shots and 63% of possession to finish behind Arsenal, allowing the Bulgarian team, who finished third in the group, to continue their presence in Europe.