Roman Yaremchuk and Gilberto scored as Benfica defeated Dynamo Kiev 2-0 at home on Wednesday to qualify for the Champions League last 16 after pipping Barcelona to second place in Group E.
Ukraine international Yaremchuk struck on 16 minutes at the Estadio da Luz and Gilberto added a second shortly after to send the Portuguese club through to the knockout phase for the first time in five years.
Benfica trailed Barca by two points going into the final round after winning just one of five games, but climbed above the struggling Spanish giants who were beaten 3-0 away by group winners Bayern Munich.
After a goalless draw between the two teams in Kiev in September, Benfica could have taken the lead inside the opening minute as Rafa Silva spooned over after Yaremchuk's shot was palmed out by Georgiy Bushchan.
Dynamo arrived having lost four in a row in the group and squandered a huge chance when Viktor Tsygankov blazed over an open goal after Vitaliy Buyalskiy got in behind the Benfica defence.
Pizzi forced Bushchan to tip over his attempt from the edge of the area in a frenetic start but Benfica soon made the breakthrough.
Joao Mario ran onto a pass in the area and pulled back for former Dynamo product Yaremchuk to poke beyond Bushchan at the near post.
Benfica quickly doubled their advantage when Dynamo midfielder Benjamin Verbic accidentally knocked the ball straight to Gilberto inside the area, allowing the Brazilian to drill into the far corner.
Two-time European Cup winners Benfica go into Monday's draw as one of two Portuguese teams alongside Sporting Lisbon.