Barcelona - DPA
Lucas Moura's late equalizer to earn a 1-1 draw at Barcelona sent Tottenham into the Champions League last 16 on Tuesday after Inter Milan drew 1-1 with PSV Eindhoven.
Spurs needed to match or better the Italians' result to follow Group B winners Barcelona into the next round, with Moura cancelling out Ousmane Dembele's brilliant opener to level the scores after 85 minutes.
Paris Saint-Germain qualified top of Group C with a 3-1 win at Red Star Belgrade while Liverpool eliminated Napoli with a narrow 1-0 win at Anfield to progress in second place.
Borussia Dortmund topped Group A with a 2-0 win at Monaco while Atletico Madrid finish second after tying 0-0 at Club Brugge.
With qualification as group winners already assured, Barcelona coach Ernesto Valverde made seven changes from the team that beat Espanyol on Saturday, leaving Lionel Messi and other star players on the bench.
That gave Spurs hope but Dembele put the hosts ahead at Camp Nou with a brilliant solo goal in the seventh minute, sprinting through and slotting coolly past Hugo Lloris.
Heung-Min Son should have equalized for Spurs, sliding in to miss a cross by inches and then firing at Jasper Cillessen when sent through on goal.
Philippe Coutinho hit the post for Barcelona at the end of the first half when he might have doubled their lead.
Harry Kane drilled over early in the second half when he should have tested Dutch goalkeeper Cillessen, while Munir El Haddadi had a goal ruled out at the other end.
After a brilliant Cillessen save from substitute Moura the Brazilian eventually scored from Kane's cross in the final stages to send Tottenham through second, beating Inter on head-to-head away goals with both sides level on eight points.
"We had quite a few chances, it just wasn't going in but we carried on and got the goal back," said Spurs striker Kane.
"We still carried on trying to score more, we weren't sure what the other score was.
"We're just buzzing that we're through. A draw away to Barcelona's not a bad result."
Tension was high at Anfield too, with Liverpool progressing on goals scored, as they tied on nine points with Napoli, each with identical head-to-head records and goal difference.
Salah missed an early chance for Liverpool, controlling Andy Robertson's ball poorly when he should have sent the Reds ahead.
However he made amends in the 34th minute with an exquisite finish from a tight angle, beating Mario Rui and Kalidou Koulibaly before squeezing the ball through goalkeeper David Ospina's legs.
Liverpool dominated the game but Napoli could have gone through in the final stages had goalkeeper Alisson Becker not kept out Arkadiusz Milik's effort brilliantly. Instead the Italians move into the Europa League.
"I thought it was a really good performance, we knew we had to defend well and we defended really well from front to back,” said Liverpool midfielder James Milner.
"Mo's goal too, he's a match-winner, a world-class player and he's done it for us again."
PSG strolled past Red Star in Belgrade to secure the top spot.
Kylian Mbappe did brilliantly to set up Edinson Cavani for the opening goal after 10 minutes, with Neymar adding an impressive second before half-time.
Marko Gobeljic's excellent volley pulled a goal back for Red Star but Marquinhos and Mbappe made the game save for the Ligue 1 side.
There was little to resolve in Group A with Atletico and Borussia Dortmund already through, but the German side sealed top spot with a win in Monaco.
Dortmund rotated heavily but still impressed, with Raphael Guerrero finishing a neat team move to send the visitors ahead against Thierry Henry's struggling hosts, before netting another in the final stages.
Galatasaray lost 3-2 against Porto in Group D but still qualified for the Europa League in third place as Lokomotiv Moscow lost 1-0 at Schalke.
Already qualified group winners Porto triumphed in Istanbul thanks to goals from Felipe, Marega and Sergio Oliveira in an entertaining game.
Lokomotiv Moscow just needed to win to assure their place in the Europa League against runners-up Schalke, but Alessandro Schopf's stoppage-time strike earned the Bundesliga side victory.
The draw for the Champions League last 16 will be held on December 17.