Ronaldinho guided Barcelona to a 2-0 win over Werder Bremen as the Champions League holders qualified from Group A.
Ronaldinho's first goal set Barca on their way
The Brazilian's cheeky free-kick gave Barca a 13th minute lead and five minutes later he began the move that Eidur Gudjohnsen stylishly finished.
Just before the interval Gudjohnsen hit the post after a breathtaking Barca move, with Ludovic Giuly inexplicably failing to score from the rebound.
After the break Bremen played with more purpose and Daniel Jensen hit the bar.
Barcelona finished runners-up in Group A, two points behind Chelsea, who beat Levski Sofia 2-0 at Stamford Bridge, while Bremen will go into the Uefa Cup.
Roma beat Group D winners Valencia 1-0 in the Olympic Stadium in the Italian capital to join the Spanish side in the knockout stages.
Veteran defender Christian Panucci scored the winner in the 13th minute to ensure Roma's progression.
Shakhtar Donetsk, who had Razvan Rat sent off late on, drew 1-1 with Olympiakos to claim a Uefa Cup spot.
Francelino Matuzalem's 27th-minute header put Shakhtar ahead, before Nery Alberto Castillo equalised for Olympiakos in the the second half.
Bordeaux secured a 3-1 away win over PSV Eindhoven in Group C to ensure the French side's Uefa Cup qualification.
Julien Faubert gave Bordeaux an early lead, while Stephane Dalmat and Jean-Claude Darcheville also scored before the interval.
Brazilian Alex hammered in a free-kick late on for PSV, who had already guaranteed their place in the last 16.
PSV finished second to Group C winners Liverpool, who lost 3-2 away in Istanbul to Turkish side Galatasaray.
Bayern Munich topped Group B after a 1-1 draw with Inter Milan.
Roy Makaay beat Francesco Toldo with a great strike to put Bayern ahead in the 62nd minute, before Patrick Vieira blasted in an late equaliser.
Spartak Moscow's 3-1 win over Sporting Lisbon gave them a Uefa Cup spot, with Roman Pavlyuchenko and Maksim Kalinichenko scoring inside 12 minutes.
Carlos Bueno's header made it 2-1 just past the half-hour, before Denis Boyarintsev tapped in on 89 minutes.