Paraguay advanced to the Copa America semifinals on Sunday by defeating defending champion Brazil 2-0 in a penalty shootout after the score was level at 0-0 following extra time.
Paraguay goalkeeper Justo Villar stopped Thiago Silva's shot and Elano, Andre Santos and Fred also missed for Brazil, which was eliminated from the South American competition a day after host Argentina lost to Uruguay.
The Argentines also lost on penalties after Uruguay goalkeeper Fernando Muslera played well in regulation and then stopped Carlos Tevez's penalty in the shootout.
Similarly, a great performance by Villar ensured Brazil failed to capitalize on its scoring opportunities despite dominating from the start.
''After the way we played today, I've never seen a more unfair result in my entire career,'' Brazil midfielder Ramires said.
It is the first time since 1989 that Paraguay has reached the final four in the South American competition.
Paraguay hasn't won any of its four matches so far. The team will now face Venezuela, which eliminated Chile 2-1 later Sunday. Uruguay and Peru, which eliminated Colombia on Saturday, will meet in the other semifinal.
''Brazil should've won after 90 minutes,'' Paraguay coach Gerardo Martino said. ''Sometimes we get these results. We played entirely differently from how we wanted to play.''
Brazil was trying to win its third straight Copa America title after having won four of the past five tournaments, and coach Mano Menezes brought a mixed squad of veterans and promising young stars to also prepare for the 2014 World Cup at home.
''It's important to keep our calm after a loss and avoid thinking that it was all negative,'' Menezes said. ''We improved after the (tough) start in the competition and we will continue working hard so we can reach the positive results in the future.''
Brazil leaves with only one win in four matches. The team drew with Venezuela and Paraguay before beating Ecuador 4-2 in the group stage.
''It's always disappointing when things don't go our way,'' Menezes said. ''We lost to a team which hasn't won a match yet and now has reached the semifinals. But that's football and we have to learn how to live with that to avoid compromising the work that we've done so far. And at the same time we have to understand what we need to do to improve from now on.''
Marcelo Estigarribia and Christian Riveros scored for Paraguay in the shootout after Villar capped his great performance by diving to his left to stop defender Thiago Silva's shot.
Thiago Silva was in doubt because of a right thigh muscle injury and made it into the lineup just before the match.
''The only thing we can do is apologize for the (missed) penalties,'' Thiago Silva said. ''There were a lot of positives during the game and we made very few mistakes.''
Brazil midfielder Elano started the shootout by missing badly over the crossbar, and Andre Santos and Fred also missed the goal.
''Brazil dominated the entire match and we had to stay back,'' Villar said. ''The penalties are a lottery. Our players did better while they failed.''
There was an altercation 11 minutes into extra time after a dispute between Brazil defender Lucio and Estigarribia near the sideline. Players from both teams were involved in the confrontation, shoving each other. Referee Sergio Pezzotta of Argentina sent off Brazil's Lucas Leiva and Paraguay's Antolin Alcaraz.
Brazil controlled possession and outplayed Paraguay from the start. The Paraguayans stayed back and relied mostly on counterattacks, but couldn't get nowhere near the Brazilian goal for most of the match.
Paraguay's first shot on target came in the 88th, when Edgar Barreto's long-range strike was deflected to allow goalkeeper Julio Cesar to make an easy save.
Paraguay forward Nelson Haedo Valdez had the only chance in extra time, just missing the far corner with a first-time shot from inside the area following a long pass by Estigarribia in the 112th.
Brazil, which outshot Paraguay 16-4, had at least five clear scoring chances in regulation, most from young striker Neymar. Villar's great performance caused Paraguay's fans to chant his name on several occasions during the match.
Villar denied Paulo Henrique Ganso in the 66th, and made another terrific stop with his feet from a close-range strike by Alexandre Pato.
Villar also stopped Brazil's best chance in the first half, blocking Lucio's shot from inside the box.
The Brazilians thought they had scored when Paraguay's Barreto cleared a header by substitute striker Fred in the 82nd, but the linesman said the ball didn't cross the line.
Neymar was replaced by Fred in the 79th minute after he apparently injured his right knee while making a cross into the area a few minutes earlier.
Paraguay played without star striker Roque Santa Cruz, who didn't recover in time from a right-leg muscle injury. He was replaced by Valdez.
Brazil played with the same 11 from the convincing victory against Ecuador in its last group match, with Maicon on the right side of the defense and Robinho in attack.
Brazil needed a last-minute equalizer in its 2-2 draw with the Paraguayans in the first stage.
Brazil: Julio Cesar, Maicon, Lucio, Thiago Silva, Andre Santos, Lucas Leiva, Ramires, Neymar (Fred, 79), Ganso (Lucas, 99), Robinho, Alexandre Pato (Elano, 110).
Paraguay: Justo Villar, Paulo da Silva, Dario Veron, Aureliano Torres (Elvis Marecos, 70), Antolin Alcaraz, Cristian Riveros, Enrique Vera (Edgar Barreto, 62), Victor Caceres, Marcelo Estigarribia, Lucas Barrios (Hernan Perez, 82), Nelson Haedo Valdez.
Referee: Sergio Pezzotta (Argentina).