Lionel Messi faces a reunion with his former club Paris Saint-Germain after his Inter Miami side reached the last 16 of the Club World Cup with a 2-2 draw with Palmeiras on Monday night.
The Brazilian side fought back from two goals down to earn a 2-2 draw at Hard Rock Stadium, a result which secured both teams a place in the knockout stages.
Goals from Tadeo Allende and Luis Suarez had Miami on course for a second surprise victory in the tournament after their win over Porto.
But the Brazilian side struck twice in the last 10 minutes through Paulinho and Mauricio to make sure of their place in the next round.
Few expected Miami to make it out of the group but they now face the European champions while Palmeiras will have an all-Brazilian encounter with Botafogo.
For Messi, who celebrates his 38th birthday on Tuesday, the tie in Atlanta will see him face his former club PSG for the first time since leaving them to join Miami in 2023.
The result meant that Egyptian club Al Ahly and Porto were both eliminated despite producing a highly entertaining 4-4 draw at MetLife Stadium in New Jersey.
There were six Argentines in the Miami starting line-up which took the field in front of a large Brazilian contingent in the 60,914 crowd.
The travelling fans were on their feet in the opening minutes when Gustavo Gomez powered a header goalwards from a corner but Oscar Ustari was down well to save.
Miami grabbed the lead in the 16th minute when Suarez brilliantly chested a long ball into the path of the onrushing Allende who showed pace to break clear of the Brazilian defence and then composure to fire past Weverton.
Palmeiras's tactics of sitting off Miami were not working with Messi dropping deep and linking up with Sergio Busquets and Federico Redondo as the Major League Soccer side enjoyed plenty of possession.
The only chance for Palmeiras before the break came when Facundo Torres found himself in a promising position after some sloppy Miami defending but he screwed his shot wide.
Messi's first real effort on goal came four minutes after the restart when he eked out just enough room on the edge of the box for a low shot but Weverton was down well.
Allende threatened again when he broke down the right and flashed a shot just wide of the post and Messi drove a bouncing ball narrowly over the bar as Miami pushed for a second goal.
That came in the 65th minute with the 38-year-old former Barcelona striker Suarez rolling back the years as he dribbled past two defenders and then blasted into the top corner.
Top spot in the group mattered to Miami as it would have avoided the clash with PSG but it was not to be as Palmeiras earned themselves a crucial point with their late revival.
Substitute Paulinho fired home in the 80th minute after a lovely reverse pass from Allan Andrade.
Then, with three minutes left on the clock, Maxi Falcon's header fell straight to Mauricio who pounced on the opportunity, rifling into the far corner to make it 2-2.
“It's an historic night for MLS, because we are into the best 16 teams in the world. All of the MLS has to be proud of Inter Miami,” Miami coach Javier Mascherano told DAZN.
“We played with heart. Normally these kinds of games are more intense than we have in the domestic league, but we also tried to progress with the ball by playing football,” he said.
Al Ahly and Porto exit after thriller
Al Ahly and Porto shared a 4-4 thriller in their final game on Monday but both will head home from Group A.
Palestine striker Wessam Abou Ali scored a hat-trick and Mohamed Ali Ben Romdhane also found the net for the Egyptian champions but Porto pegged them back every time they went ahead.
Teenagers Rodrigo Mora and William Gomes, substitute Samu Aghehowa and Pepe all scored for the Portuguese club as both teams all but abandoned defending in search of goals that might keep them alive in the tournament.
In the end, though, a draw was not enough for either side and the 2-2 stalemate between Inter and Palmeiras in Miami was enough to render all of the many other permutations null and void.
“I'm very sad, very, very sad,” said Abou Ali. “I feel like we should have scored maybe five, six goals in the end, the opportunity was there to at least win the game and score some goals.”
PSG and Botafogo progress from Group B
PSG beat Seattle Sounders to clinch top spot in Group B but Atletico Madrid bowed out despite a late 1-0 win over Botafogo.
The European champions went into their final pool match at risk of elimination following a shock loss to the Brazilian side, but goals from Kvicha Kvaratskhelia and Achraf Hakimi proved enough.
Atletico, thumped 4-0 by PSG in their opening match, needed to win by three clear goals to progress but a late winner from substitute Antoine Griezmann was not enough and it was Botafogo who reached the next stage.
PSG’s progression was not without a scare as Seattle started well at their own Lumen Stadium and could have grabbed a shock lead when Jesus Ferreira almost punished goalkeeper Gianluigi Donnarumma for a rare mistake.
Kvaratskhelia was fortunate to deflect a Vitinha effort into the net in the 35th minute and Hakimi added a second in the 66th minute on the end of a sweeping attacking move moments after Obed Vargas had come close to equalising.
Atletico struggled to assert themselves against Botafogo with keeper Jan Oblak forced into good saves to deny Jefferson Savarino and Igor Jesus.
Griezmann found the net in the 87th minute when he swept home Julian Alvarez’s low cross from the left but it was not enough and Botafogo will face Palmeiras at the next stage after the Brazilian side’s 2-2 draw with Inter Miami.