In a dramatic climax to one of the tightest groups in Champions League history, Borussia Dortmund needed an 87th-minute goal at Marseille to advance at the expense of Napoli, who beat Arsenal 2-0.
Dortmund, last season's finalist, was on the brink of elimination and missed a series of chances against the 10-man French side until Kevin Grosskreutz scored to clinch a 2-1 win.
Instead, Dortmund won the group ahead of Arsenal, which lost to Napoli as all three teams finished on 12 points and head-to-head tiebreakers sent the Italians out.
"What a feeling! We were almost out of the competition. This is great. We deserved it. And I didn't even hit the ball right," said Grosskreutz, who has a tattoo of the Dortmund skyline on his back.
Dortmund's progress seemed under control when Polish forward Robert Lewandowski scored in the fourth minute against Marseille, which lost all its group matches.
Though Souleymane Diawara levelled with a header in the 14th, Marseille was soon reduced to 10 men when Dimitri Payet was shown a second yellow card for being adjudged to have dived in the Germans' penalty area.
Dortmund laid siege to the home goal in the second half but Lewandowski missed an open goal, putting his shot into side netting after rounding goalkeeper Steve Mandanda.
Lewandowski was denied a penalty claim in the 85th when bundled to the ground by Mandanda. When Grosskreutz scored, Napoli led Arsenal through Gonzalo Higuain's 73rd-minute goal but needed to win by three goals. Despite Arsenal midfielder Mikel Arteta being sent off in the 75th, Napoli added only a second from Jose Callejon in stoppage time to complete one of the unluckiest group-stage exits since the Champions League format was created in 1992.
"It's difficult to explain how deeply we are disappointed," said Napoli defender Christian Maggio. "Our group was incredible and we matched two fantastic teams."
Arsenal manager Wenger said Napoli may have "played a bit with the handbrake on", easing the pressure on the English side, when they thought a 1-0 win would take them through.
Benitez agreed Napoli were influenced by what was going on in Marseille.
"We should have scored a goal earlier, but we knew it was 1-1 in Marseille and we were afraid to push too hard," he said.
In the last 16 draw, the seeded teams cannot play a team from their own country or the team it already played in the group.