BELO HORIZONTE, Brazil - Nervous Brazil has beaten Chile 3-2 on penalties to reach the World Cup quarter-finals after an epic battle finished 1-all at the end of normal time.
Two first half-goals were all the teams managed in a fast-paced and tense 120 minutes in the Mineirao Stadium which left some players in tears.
Gonzalo Jara missed the decisive penalty for Chile, crashing his shot against the post and across the face of the goal, to continue his country's record of World Cup misery against Brazil.
Willian and Hulk both missed from the spot for Brazil, but David Luiz, Marcelo and Neymar all kept their cool to score while Julio Cesar made crucial saves from Mauricio Pinilla and Alexis Sanchez.
Neymar sank to his knees in disbelief afterwards amid widespread tears of joy. Some of the Chilean players hid their weeping under their shirts as they left the field.
"We knew when the draw was made seven months ago that we might come up against Chile and we knew then how difficult it might be. Chile are a very well-organised team and it was a very well-balanced game," said relieved Brazil coach Luiz Felipe Scolari.
"We had three or four more chances to score a second goal and when you don't get that goal you always run a risk," he added.
Chile coach Jorge Sampaoli said: "I am sad because to play like this against the hosts and end up losing in the way we did is obviously very hard for us. The players did everything they could."
Earlier, Barcelona star Sanchez had pounced on poor Brazilian defending to equalise for Chile in the 32nd minute, cancelling out an 18th-minute opener for the hosts by Luiz.
Brazil had the majority of the chances but were jittery in the second half and were hugely lucky to survive at the end of extra time when Chilean substitute Pinilla lashed a shot against the bar from the edge of the area.
As in all of their group games, Brazil started frantically amid a backdrop of deafening noise from the crowd of almost 60,000.
Chile were subjected to the sort of high and energetic pressing game they normally inflict upon others and Marcelo shot narrowly wide before English referee Howard Webb rejected loud appeals for a penalty when Hulk went down in the area after coming together with Mauricio Isla.
Brazil and their fans celebrated in the 18th minute, however. Neymar swung in a corner from the left and Thiago Silva headed the ball on towards the back post, where David Luiz bundled it in, with the help of Chile defender Jara.
Chile, who also lost to Brazil in the round of 16 in 1998 and 2010, faced a huge challenge to come from behind, but Brazil allowed them to control possession and gifted an equaliser.
Hulk made a careless pass, allowing Eduardo Vargas to pounce and set up Sanchez, who coolly beat Cesar in goal.
Sampaoli's side were then forced to weather a storm before halftime that saw a Neymar header deflected past the post and Claudio Bravo tip over a powerful 30-yard drive from Daniel Alves.
As nerves took hold in the second half, Chile seemed happy to take their chances in the lottery of a penalty shoot-out.
Pinilla almost won it right at the last shot, only for the woodwork to rescue Brazil, as it did again from Jara's crucial penalty.