Brazil scraped into the Copa America semi-finals with a thrilling penalty shootout win over Paraguay on Friday (AEST).
Frustrated for long periods in Porto Alegre, the hosts were forced to penalties after a 0-0 draw at the Arena do Gremio.
Paraguay managed to see out the final half-hour with 10 men after Fabian Balbuena was sent off for denying Roberto Firmino an obvious goalscoring opportunity.
But Brazil proved too good in the shoot-out, Alisson making one save and Gabriel Jesus converting the winner in a 4-3 success.
Brazil created a fine early chance, Firmino's low shot from just inside the area comfortably saved by Paraguay goalkeeper Roberto Fernandez.
There were shots at both ends in the opening exchanges, but most came from range before Paraguay almost took the lead.
Derlis Gonzalez was found at the back post and his powerful strike from an angle was well saved by Brazil shot-stopper Alisson.
A Philippe Coutinho effort from an angle was comfortably saved five minutes before half-time and there were some boos for the host nation at the break.
They continued to enjoy the better of the play to begin the second half and thought they had a penalty in the 54th minute.
Firmino was brought down by Balbuena and a penalty was awarded, only for a VAR review to see the defender sent off and a free-kick paid just outside the area.
Dani Alves fired the free-kick inches wide from 20 yards, while Arthur forced Fernandez into a save in the 70th minute.
Brazil somehow squandered two opportunities just four minutes later, Coutinho mistiming a header from Everton's cross before Jesus volleyed wide from close range.
The chances continued to come for Brazil as Paraguay sat deep and they almost struck from a set-piece, but Fernandez did brilliantly to save an Alex Sandro header from Coutinho's free-kick.
Paraguay continued to hold on but only just, Willian's curling strike from 20 yards beating Fernandez but bouncing off the post.
Everton and Coutinho had shots deflected off target deep into additional time as the 10 men of Paraguay managed to get to spot-kicks.
Alisson saved Gustavo Gomez's penalty to give Brazil the early advantage and while Firmino failed to convert, Gonzalez dragged his penalty wide before Jesus sent the hosts through.
What does it mean? Brazil survive but only just
Tite's men had their chances but failed to convert, Paraguay seemingly getting what they wanted by reaching penalties. However, Brazil were too good and remain on track for a first Copa America title since 2007.
Alisson, Jesus step up at key moment
Alisson enjoyed a sensational season with Liverpool and his fine save from Gomez was the ideal start to the shoot-out for Brazil. Willian, Marquinhos and Coutinho also scored from the spot before Jesus' sealer.
Paraguay continue to trouble Brazil
Paraguay were unbeaten in their past four Copa America games against Brazil and they gave the South American giants a huge scare. Well organised and prepared to play on the counter-attack, they almost caused a huge upset.
Brazil will face either Argentina or Venezuela in a semi-final in Belo Horizonte on Tuesday, while Paraguay are left to reflect on their defeat.