Brazil goalkeeper Julio Cesar kept the hosts' hopes of World Cup glory alive on Saturday (local time), saving two spot-kicks in a shootout against Chile to send them into the last eight 3-2 on penalties following a pulsating 1-1 draw after extra time.
Four years to the day since Brazil eliminated Chile at the same stage of the 2010 tournament, they did it again when Gonzalo Jara crashed his spot-kick against the post after Cesar had twice denied the battling Chileans.
Man-of-the-match Cesar, heavily criticised four years ago after Brazil's World Cup exit to the Netherlands, also made an outstanding save in the second half of normal time as the five-times champions moved unconvincingly into a quarter-final against Uruguay or Colombia.
David Luiz had put Brazil ahead after 18 minutes but Alexis Sanchez equalised for battling Chile before halftime and the host nation watched with bated breath as Brazil were on the brink of elimination after Willian and Hulk had failed to convert their spot-kicks.
Fortunately for Brazil, Cesar also saved penalties from Mauricio Pinilla and Alexis before Jara's doomed attempt.
"It was complicated," Cesar said. "The pressure of representing Brazil and playing at home is really great. We played well in the first half but after Chile equalised they got into the game."
"My team mates gave me support and strength. My big dream is that Brazil have a party," said the keeper after helping avoid Brazil's first home defeat in a competitive game since 1975.
For Chile it was a bitter end to a promising World Cup after beating holders Spain in the group stage to cement their status as tournament dark horses.
They failed, however, to exorcise their Brazilian demons once again and fell to them at the same stage as in 1998 and 2010, the last two times they were in the tournament.
They have never managed to beat Brazil at home and have won just seven of 69 games against them.
The Brazilians, who have now eliminated their fellow South Americans in four World Cups including in the 1962 semi-finals in Chile, set a blistering pace and Marcelo took a first crack at goal with a volley that sailed wide.
Chile quickly lost the battle in midfield but their defence kept tournament joint top scorer Neymar in check.
They were helpless, though, when Neymar whipped in a corner in the 18th minute, Thiago Silva headed it on and Luiz, with what looked like some help from Chile's Jara, bundled it in for his first international goal in his 40th appearance.
With the small red patches of Chile fans in the Mineirao stadium swallowed up by a vast sea of yellow shirts, five-times champions Brazil kept pouring forward and Neymar should have done better when he raced clear, only to drive a low shot wide.
Chile, however, levelled 14 minutes later after making the most of a throw-in mix-up between Hulk and Marcelo to send Alexis into the box and the forward drilled the ball in to stun the crowd into temporary silence.
Neymar went agonisingly close with a header that scraped past the post and controlled a superb deep cross-field ball to set up Fred who fired over.
Dani Alves tested Claudio Bravo with a thundering long-range effort but the Chile keeper did well to tip it over the bar.
Brazil, who had won nine of their previous 10 games against Chile, thought they had scored again early in the second half when Hulk controlled a deep cross and scuffed the ball in but referee Howard Webb booked the forward for handball.
With the clock ticking and Brazil getting more nervous, the Chileans felt confident they could pull off a huge upset, similar to Brazil's shock defeat in the 1950 World Cup final against Uruguay, known as 'Maracanazo'.
Cesar pulled off a sensational save to deny Charles Aranguiz from point-blank range in a scintillating game in front of 58,000 spectators in which one wrong pass would potentially prove costly.
Chile, running on empty in extra time, almost snatched a dramatic last-minute winner when Pinilla rattled the crossbar with a tremendous shot but Brazil survived the scare with their fans looking to the skies and praying before the penalties started..
"That near goal right at the end has been really hard for us," Chile coach Jorge Sampaoli told reporters.
"If we had scored, we would have made history for ever. It would have been the 'Mineirazo'. We so nearly won," he said.
Luiz, Marcelo and Neymar converted their penalties and although Willian missed the target and Hulk's effort was saved, Cesar denied Pinilla and Alexis and when Jara sent his effort against the inside of the post the stadium erupted in celebration.
"It's at time like this you get your support from friends and team mates and thanks to Julio who made great saves," Hulk said.
"God willing we will go to the end and make the final. We suffered but we made it. We knew this would be a very hard game, it went to extra time but even with cramps we ran till the end."
Brazil has reached the quarterfinals at the last five World Cups. Chile has not advanced past the second round since it hosted the 1962 tournament.
What do you make of Tommy Smith's decision not to play for the All Whites?Related story: (See story)