Gabriel Jesus scored the decisive spot-kick as hosts Brazil beat Paraguay on penalties to reach the Copa America semi-finals.
Paraguay had Fabian Balbuena sent off after 58 minutes for a foul on Roberto Firmino, but the match ended goalless.
Gustavo Gomez and Derlis Gonzalez missed from the spot for the visitors as Brazil won the shootout 4-3.
The eight-time winners - booed by their fans in their first two games - will next face Argentina or Venezuela.
Brazil, who last won in 2007, were initially awarded a penalty following West Ham defender Balbuena's foul on Liverpool forward Firmino when he was through on goal - but the decision was overturned after a video assistant referee check showed the offence took place outside the box.
The hosts peppered the opposition goal in Porto Alegre, registering 26 attempts - Manchester City forward Jesus shot narrowly wide from close range before Chelsea winger Willian hit a post in the final minute.
Brazil were beaten by Paraguay on penalties in 2011 and 2015, but they triumphed this time despite Firmino dragging his spot-kick wide when they led 3-2.
Potential opponents Venezuela and Argentina play later on Friday, with the semi-final taking place in Belo Horizonte next Tuesday.