Paulinho came off the bench to score an extra-time winner as Palmeiras overcame Botafogo in an all-Brazilian tie to become the first team through to the quarter-finals of the Club World Cup.
The rivals cancelled each other out in a poor game until former Bayer Leverkusen winger Paulinho cut in from the right and fired a low strike past Botafogo goalkeeper John in the 10th minute of extra time.
Palmeiras, who finished the game with 10 men after a red card to captain Gustavo Gomez, will now face the winners of the last-16 contest between Benfica and Chelsea for a place in the semi-finals.
The tone for the first knockout tie of the new-look tournament was set early as Botafogo centre-back Alexander Barboza clattered into Richard Rios, bringing out the first yellow card of a cagey affair that Palmeiras dominated.
Palmeiras striker Vitor Roque failed to turn in an inviting cross from Joaquin Piquerez after 10 minutes before he had a penalty appeal waved away.
But the closest the Sao Paulo club came to scoring in the first half was in stoppage time when a Rios effort skimmed the roof of the net on its way out.
Chelsea-bound Estevao Willian tested John soon after the restart with a left-footed strike from 25 yards before he had a goal ruled out for offside. Mauricio was then denied by John who tipped over a close-range header to force extra time.
John remained the busier keeper and was forced into a save by Rios early in extra time but there was nothing he could do seconds later when Paulinho scored the winner.