Lionel Messi scored one goal and set up two more in his 700th game for Barcelona to ensure the Spanish club reached the Champions League's knockout rounds with a 3-1 win over Borussia Dortmund on Wednesday.
Messi fed Luis Suárez to open the scoring at Camp Nou in the 29th minute before his strike partner returned the assist for the Argentina star to add a goal of his own moments later.
Messi then led a counterattack and played substitute Antoine Griezmann through on goal to put the result beyond doubt in the 67th.
Dortmund's halftime substitute Jadon Sancho pulled one back in the 77th and almost got a second goal when Marc-Andre ter Stegen pushed his shot onto his post.
In addition to his goals and assist, Messi repeatedly wowed the home crowd by regularly dribbling past Dortmund's helpless defenders. He also went close to another goal when he curled a free-kick off the crossbar.
Messi took his club-record tally to 613 goals as he closed in on Xavi Hernández's all-time appearance milestone of 767 matches for the Spanish club. The Argentine has 114 goals in Europe's top-tier tournament.
Barcelona has 11 points in Group F and secured top spot with one game remaining. Dortmund has seven but is behind Inter Milan on goal difference after the Italian team won 3-1 at Slavia Prague. Prague has two points.
Only the top two teams advance. The third-place finisher goes to the Europa League.
Ernesto Valverde's team extended its competition record to 35 consecutive home matches without a defeat going back to 2013.
Elsewhere in the group, Inter Milan struck late to beat Slavia Prague 3-1 and stay in contention for a place in the last 16 after a free-flowing game featuring many chances.
Lautaro Martinez put Inter ahead in the 10th minute, connecting with a pass by Romelu Lukaku who beat two Slavia defenders on the right side of the box.
The two swapped roles in the 35th minute, but the video referee disallowed Lukaku's effort because of a foul.
Tomas Soucek leveled for Slavia but Inter sealed victory in the last 10 minutes when Lukaku shot into an empty net after his marker slipped, allowing the Belgian striker to score his first Champions League goal of the season.
Martinez sealed victory for the Italian side in the 89th minute.
In Group E, Liverpool and Napoli played out a 1-1 draw at Anfield to leave both teams' qualification hopes hanging in the balance.
Dejan Lovren headed home from a corner in the 65th minute to equalize for Liverpool after the defending champions fell behind to Dries Mertens' goal in the 21st.
Liverpool maintained its one-point lead over Napoli in the group but both can now be caught by Salzburg, which won at Genk on Wednesday.
Liverpool plays Salzburg away in its final group game – they are separated by three points – and the English club needs to avoid defeat or have a low-scoring loss by a one-goal margin to secure a top-two finish. Liverpool currently leads the head-to-head, having beaten Salzburg 4-3 at Anfield in October.
Napoli will qualify by beating already-eliminated Genk at home in its last group game.
Liverpool lacked any tempo in the first half and wasn't helped by an ankle injury to Fabinho that forced the defensive midfielder off the field in the 19th minute.
Mertens scored soon after, racing onto a long pass forward from Giovanni Di Lorenzo and drilling a low shot past goalkeeper Alisson Becker into the far corner.
The goal was subject to a review by VAR, which checked for offside against Mertens and whether the Belgium forward fouled Virgil van Dijk early in the build-up, but it was allowed to stand.
Van Dijk stayed down after colliding with Mertens in that incident, giving the Napoli player space to run through. After receiving treatment, Van Dijk continued.
Liverpool dominated the second half and got its reward when James Milner drove in a corner from the right and Lovren rose highest to head the ball from a central position inside the far post.
In Group G, two late goals from Emil Forsberg helped Leipzig rescue a 2-2 draw with Benfica and secure a spot in the knockout stages for the first time.
Benfica was leading 2-0 when Ruben Dias conceded a penalty, allowing Forsberg to score his first goal in the 90th minute.
With nine minutes of added time announced following an earlier injury for Leipzig's goalkeeper, the German team threw players forward and was rewarded in the 96th minute when Timo Werner's cross found Forsberg in space to head in and level the score.
Earlier, Benfica had scored both goals after errors in defense from Leipzig. Worse, goalkeeper Péter Gulácsi went off with an apparent head injury after colliding with Carlos Vinicius as the Benfica player celebrated scoring the second goal.
Leipzig's eventual comeback sent the home fans into raptures, but they still needed substitute goalkeeper Yvon Mvogo to pull off a late save to protect the result.
When the referee finally blew the whistle after 101 minutes, it ended Benfica's hopes of qualifying.