Brazil secured a dramatic shootout victory over Chile to reach the quarter-finals and keep alive their dream of winning the World Cup on home soil.
QPR goalkeeper Julio Cesar saved from Mauricio Pinilla and Alexis Sanchez before Gonzalo Jara hit a post with the decisive spot-kick to prompt wild celebrations inside Estadio Mineirao.
David Luiz and Marcelo had converted their efforts for Brazil, but with Willian and Hulk missing, it fell to the hosts' star striker Neymar to step up under intense pressure and nervelessly slot what proved the winning kick.
Luiz had earlier put the hosts in front, only for Alexis Sanchez to equalise. Hulk then had a strike disallowed for handball - fairly, but much to the disgust of the home fans - while Pinilla hit the crossbar for Chile in the final minute of extra time.
It was a match of variable quality but no little drama, and one that left players, staff and supporters of both teams in tears.
Cesar - who joined Toronto FC on loan in January and has barely played in the past year - ended an unlikely hero, redeemed after his mistake cost Brazil in the quarter-finals four years ago.
Brazil go on to face Colombia or Uruguay in Fortaleza on Friday; Chile go home but with their reputation as one of the game's most dangerous sides significantly enhanced.
Fred had the most shots in the first half, but failed to get one on target.
Brazil have now lost just one of their last 16 World Cup games when scoring first.
Five of Chile's six goals at the World Cup have come before half-time.
Fernandinho committed more fouls (6) than he made passes (4) in the opposition half.
If a penalty is being taken to avoid elimination, the success rate is only 44%.
The last eight World Cup shootouts have been won by the team going first.
Having never lost to La Roja on home soil and having won all three of their previous World Cup meetings, Brazil arrived with history on their side.
Chile earned a 2-2 draw at the same venue last year but that was one of only two encounters in which they avoided defeat since last beating Brazil 14 years ago.
The noise in the stadium before before kick-off was astonishing, swathes of yellow dominating the pockets of red, and the atmosphere only intensified when Fernandinho went in late on Charles Aranguiz, and the Chile midfielder and team-mate Gary Medel responded in kind by wiping out Neymar.
After English referee Howard Webb turned down a penalty appeal at either end, Brazil soon took control and were rewarded for their pressure when Neymar's corner was flicked on by captain Thiago Silva and steered into the net by what appeared a combination of Luiz and Chile defender Jara.
Brazil's main threat was once again Neymar, the 22-year-old dragging a shot wide after racing towards goal and then being sent flying by Arturo Vidal's reckless challenge.
Coach Luiz Felipe Scolari had warned his side they could not afford to make any mistakes in the knockout stage and he would have been furious with the way Chile were allowed back into contention.
Hulk's poor control from Marcelo's throw-in gifted possession to Eduardo Vargas and he quickly found Sanchez in the penalty area to drill a low finish across Cesar.
Brazil worked hard to regain the lead but the half ended with the hosts frantically scrambling to deny Aranguiz after carelessness from Luiz Gustavo.
The second half felt comparatively subdued until Webb's big call arrived, either he or his assistant Mike Mullarkey judging Hulk to have controlled a pass with his arm before beating Bravo. It was a tough and unpopular decision but seemed, on the basis of television replays, to be the correct one.
A period of Chile pressure ensued as Cesar superbly denied Aranguiz from close range.
Former Manchester City striker Jo replaced Fred to a warm welcome - he now plays for local side Atletico Mineiro - and might have made a quick impact, but failed to connect with Hulk's cross.
Bravo did well to repel a Neymar header and Hulk's powerful strike, again thwarting the much-improved Hulk in the first period of extra time.
Scolari played his final card by introducing Willian for a disappointing Oscar, but the weary Chileans - for whom the excellent Medel was carried off on a stretcher in tears - switched from an aggressive 3-1-4-2 formation to a defensive 5-1-3-1 and appeared intent on holding on for penalties.
They could, however, have snatched the most incredible of winners when substitute Pinilla rattled the bar powerfully in the final minute.
Penalties would be needed and Brazil held their nerve to make the last eight.
- 12 Julio César
- 02 Dani Alves Booked
- 06 Marcelo
- 17 Luiz Gustavo Booked
- 03 Thiago Silva
- 04 David Luiz
- 11 Oscar (Willian - 105' )
- 05 Fernandinho (Ramires - 72' )
- 09 Fred (Jô - 64' Booked )
- 10 Neymar
- 07 Hulk Booked
- 01 Jefferson
- 08 Paulinho
- 13 Dante
- 14 Maxwell
- 15 Henrique
- 16 Ramires
- 18 Hernanes
- 19 Willian
- 20 Bernard
- 21 Jô
- 22 Victor
- 23 Maicon
- 01 Bravo
- 04 Isla
- 02 Mena Booked
- 18 Jara
- 17 Medel (Rojas - 108' )
- 05 Silva Booked
- 20 Aránguiz
- 21 Díaz
- 08 Vidal (Pinilla - 87' Booked )
- 07 Sánchez
- 11 Vargas (Gutierrez - 57' )
- 03 Albornoz
- 06 Carmona
- 09 Pinilla
- 10 Valdívia
- 12 Toselli
- 13 Rojas
- 14 Orellana
- 15 Beausejour
- 16 Gutierrez
- 19 Fuenzalida
- 22 Paredes
- 23 Herrera
Ref: Howard Webb