Belgium struck early and held off a late Brazil fightback to send the five-times champions tumbling out of the World Cup with a 2-1 victory in an end-to-end thriller on Friday that earned them a semi-final against France.
A Fernandinho own goal and a brilliant Kevin De Bruyne strike gave Belgium a spot in the last four for the second time after 1986 and sent Brazil home at the quarter-final stage for the third time in the last four World Cups.
Brazil dominated possession and carved out chance after chance but, despite the best efforts of Neymar, were unable to find the net until substitute Renato Augusto headed home Philippe Coutinho's cross 14 minutes from time.
Roared on by the vast majority of the crowd at the Kazan Arena, the Brazilians poured forward to try and save the game but Roberto Firmino, Augusto and Coutinho spurned gilt-edged opportunities to level the scores.
Neymar continued to run at the Belgium defence until the end but had a second penalty appeal waved away by Serbian referee Milorad Mazic and a final shot tipped over the bar by Belgium goalkeeper Thibaut Courtois as the last few seconds ticked away.
"They did it... they were incredible, incredible hearts out there," said Belgium's Spanish coach Roberto Martinez.
"I didn't think for one minute they were going to give up... (our) execution was magnificent. When you say we are going to play in a certain way, they changed their tactical disposition and tactics... it (our gameplan) was executed to perfection."
If Belgium's first goal in the 13th minute had an element of luck, with the ball going into the net off Fernandinho's shoulder from a corner, the second in the 31st minute was a shining example of counter-attacking football.
Romelu Lukaku took the ball with his back to goal, turned into space and stormed past Fernandinho up the pitch before releasing De Bruyne on his right for the playmaker to rifle the ball into the net from the edge of the box.
De Bruyne, playing in a more advanced role than he had in Belgium's previous four matches, was at the heart of his team's best work, managing the transition from rearguard defence to attack with vision, pace and accuracy.
However, this was no repeat of Belo Horizonte four years ago, when Brazil were thrashed 7-1 by Germany in the semi-finals on home soil, and they kept their shape and composure despite conceding two goals for the first time in 26 matches under Tite.
But it is Belgium's 'golden generation' who will take their place in a World Cup semi-final lineup that for the first time will not feature one of Brazil, Argentina or Germany.
"We are leaving the World Cup with sadness," said Brazil skipper Miranda. "We lost to a great team who took their chances to score two goals. We are a battling group, with good young players who can win the next World Cup."
"Our team tried, fought until the end and we leave with our heads held high because we gave everything."