Bayer Leverkusen could not find a winner against Barcelona as their final Champions League Group E match ended 1-1, which saw the German side fail to qualify for the last 16 and drop into the Europa League.
Leverkusen, who had not won in Europe since matchday one, could have made it through if they bettered Roma's result against BATE Borisov.
However, despite the Italians being held to a goalless draw, the Bundesliga side could not conjure up a winner, despite having plenty of chances in the second half.
Barcelona, who were already through as group winners, went ahead on 20 minutes through Lionel Messi, only for the in-form Javier Hernandez to soon equalise.
Marc-Andre ter Stegen was kept busy in the Barca goal, but Leverkusen failed to fashion a second goal, and finished third with six points behind Roma on head-to-head record.
After a low-key start at the BayArena, the match sparked to life with two goals in the space of three minutes.
Barcelona midfielder Ivan Rakitic's pass split a high defensive line, allowing Messi to race clear.
The Argentina forward dashed into the penalty area before rounding goalkeeper Bernd Leno and slotting home with a low angled shot which defender Borges Wendell could not clear off the line despite dashing back.
The visitors' lead, however, was soon cancelled out.
Admir Mehmedi was played away down the left, and his low cross was touched on by Hakan Calhanoglu, with the ball falling into the path of Hernandez, who sent a rising left-footed shot into the top corner past Ter Stegen for what was a 12th goal in 11 appearances from the former Manchester United frontman.
Barcelona had a couple of chances to regain their lead before half-time, with Messi off target before Calhanoglu tested Ter Stegen from 25 yards.
At the start of the second half, the German goalkeeper made a hash of a clearance, but the hosts failed to capitalise as Mehmedi could not get on the end of Hernandez's flick.
Leverkusen, who had led in the reverse fixture at the Nou Camp in September with 80 minutes on the clock, only to concede twice late on to lose 2-1 - continued to press as the hour approached.
Following a scramble in the Barcelona penalty area, Calhanoglu's snap-shot from 10 yards flew straight at Ter Stegen.
Leverkusen wasted another great chance when winger Karim Bellarabi was put clear of the defence, but failed to beat the busy Barcelona keeper.
Ter Stegen was called upon again to tip over a 20-yard effort from Kevin Kampl before Barcelona finally settled into a spell of possession to frustrate the hosts.
With 11 minutes left, Sandro was denied by a fine save from Leverkusen keeper Leno.
In stoppage time, the ball broke to defender Jonathan Tah at the edge of the crowded Barcelona box, but his snapshot bobbled wide, which just about summed up the evening for the Germans.