Paulinho came off the bench to score a dramatic extra-time winner as Palmeiras edged out fellow Brazilians Botafogo 1-0 on Saturday to book their place in the Club World Cup quarter-finals.
The match, played in Philadelphia's sweltering summer heat, remained goalless after 90 minutes of cagey and ill-tempered football.
In the 100th minute, Paulinho delivered the decisive moment, cutting in from the right, dribbling past two defenders and firing a low angled shot into the bottom corner, beyond the reach of Botafogo keeper John.
Botafogo pushed for an equaliser but failed to capitalise, even after Palmeiras were reduced to 10 men when Gustavo Gomez received a second yellow card for a tactical foul.
Palmeiras held firm and will next face the winners of the clash between Benfica and Chelsea on Friday in Philadelphia.