Belgium struck early and held off a late Brazil fightback to send the five-time 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.
A superb first half display by Belgium ended Brazil's hopes of a record sixth World Cup crown as a Fernandinho own goal and a superb Kevin De Bruyne strike proved enough to win 2-1 and seal a semi-final spot. Although Brazil roared back in the second half with a headed goal from Renato Augusto, it is the Belgians who will face France in Saint Petersburg on Tuesday.
Unbeaten in their last 15 games, Brazil's bid for a second consecutive place in the semi-finals looked in safe hands. But after an energetic start that saw Thiago Silva come close and Neymar show early promise, Brazil heads went down following Fernandinho's own goal before De Bruyne's superb strike from distance put the Red Devils in control on 31 minutes.
Late changes by Brazil coach Tite paid off as Renato Augusto's superb header 14 minutes from time dragged the south Americans back into contention.
But as Belgian legs tired, Brazil spurned several great chances to push the match into extra-time, Augusto drilling inches wide and Coutinho skewing his effort off target from Neymar's pass.
Courtois produced a great save in the dying minutes, tipping over a curling drive from Neymar as the Belgians ensured they will make just their second visit to the last four, 32 years after their surge to semis in Mexico.
Brazil dominated possession and carved out chance after chance but could not score 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.
If Belgium's first goal in the 13th minute had an element of luck, 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 rear-guard defence to attack with vision, pace and accuracy.
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 Tite's side kept their shape and composure.
Belgium goalkeeper Thibaut Courtois, though, made a fine save from Coutinho and Serbian referee Milorad Mazic waved away penalty appeals from Neymar and Gabriel Jesus.
The Brazilians finally got some reward for their efforts with Augusto's header and Belgium needed a brilliant fingertip Courtois save from Neymar in the last seconds to secure a date with neighbours France in St Petersburg on Tuesday.
On eight minutes Courtois was flapping when Neymar's corner was flicked on by Joao Miranda, came off the thigh of Thiago Silva and then off the post.
Tite had replaced suspended holding midfielder Casemiro with Fernandinho in his starting line-up, handing the Manchester City player his first World Cup start since he was hauled off at half-time on Brazil's way to the humiliating 7-1 semi-final defeat to Germany in 2014.
Fernandinho's World Cup woes continued, Hazard's corner coming off the midfielder's arm to glide past Alisson and into the net as he rose to block.
Brazil almost equalised immediately, Neymar dribbling down the left and finding Gabriel, only for his effort to go amiss.
But Belgium's early opener showed the Red Devils were oozing confidence, Hazard and De Bruyne linking incisively to carve open the Selecao's well-oiled defence with surprising ease.
On 21 minutes De Bruyne set up Hazard on a free run inside to set up Thomas Meunier, only for Miranda to block his intended cross for Lukaku.
A minute later De Bruyne found Lukaku in acres of space, the big striker coolly nutmegging Miranda before seeing the ball frantically cleared into the stands.
Superb control from Marcelo saw the Real Madrid defender chest down, cut inside and unleash a low drive that Courtois did well to block.
But when Belgium countered on the half hour, it was with devastating effect.
Lukaku looked invincible as he powered through Brazil's midfield before finding De Bruyne in space on the right.
The Manchester City ace had time to pick his spot before unleashing a right-footed drive that screamed past Alisson and inside the 'keeper's far post.
Tite replaced the ineffective Willian with Roberto Firmino at half-time and soon after changed Jesus for Douglas Costa.
But it took the arrival of China-based Augusto 17 minutes from time that sparked Brazil into life.
Brazil saw two penalty claims in quick succession waved away by Serbian referee Milorad Mazic after Neymar tumbled following contact with Fellaini and Gabriel went to ground after a challenge from Vincent Kompany.
De Bruyne released Hazard down the left but he firing narrowly wide of Alisson's far post as Lukaku waited to pounce.
Minutes later Augusto hung in the air to meet Coutinho's perfectly-weighted cross and direct it past Courtois to spark celebrations among the Brazilian fans in Kazan.
Brazil vs Belgium Live Score, FIFA World Cup 2018
01:24: FT: Brazil 1-2 Belgium. The record champions go out crashing of the World Cup. Brazil displayed a brilliant show on the attack but failed to overcome their World Cup drought.
01:23 IST: Belgian earn a corner, Kevin De Bruyne takes a short one, keeps the ball inside the Brazil half as referee blows the final whistle.
01:22 IST: SAVE! Courtois does well, to keep a curling shot from Neymar out.
01:17 IST: Free-kick for Belgium inside their own half after Hazard was brought down by Fagner and we enter the 90th minute. 5 minutes injury time to be added.
01:14 IST: Romelu Lukaku has been replaced with Tielemans for Belgium.
01:13 IST: Yellow card for Fernandinho for bringing Hazard down as Belgium look to keep possession off the ball. 85 minutes on the clock.
01:10 IST: Substitution for Belgium, Chadli has been replaced by Vermaelen in the 83rd minute.
01:08 IST: SHOT GOES WIDE! Augusto gets a clear chance on goal, he was left unmarked but he sends it just away from the post at the far corner.
01:06 IST: Firmino gets a shot, off target from near the box but he has skied it. Brazil has got 21 attempts on goal so far.
01:04 IST: GOAL! Renato Augusto pulls one back for Brazil from a clinical header as the ball ends in the near corner. Brazil 1-2 Belgium in the 76th minute.
01:02 IST: Costa from the right flank, takes a shot which on a rebound from Courtois falls for Neymar -- who takes a shot but cleared away by the Belgian defence.
00:57 IST: Douglas Costa tries his luck from outside the box but hits the defender on the way as Brazil retain possession. 70 minutes played.
00:52 IST: Belgium back on the possession, but a foul on Neymar puts Brazil back on the counter as Coutinho's heavy touch goes for a Belgium throw in.
00:49 IST: Chadli breaks on the counter for Belgium, finds de Bruyne in space at the midfield who finds Hazard on the left flank, whose cross is a bit too much for the target man. 63 minutes on the clock.
00:44 IST: Penalty ruled out by VAR for Brazil! Gabriel Jesus nutmeg Vertonghen and takes a little flick of Kompany as Brazil appeal for a spot kick!
00:39 IST: Neymar finds Marcelo ahead on the left flank, as the Real Madrid defender's cross has been cleared away by the Belgian defence as Brazil retain possession.
00:37 IST: Firmino has replaced Willian in the second half.
00:34 IST: Free-kick for Belgium, from the left flank, Kevin de Bruyne takes a short one but fail to maintain possession on the ball as Brazil initiate their first attack of the second half.
00:33 IST: Second-half gets underway.
00:17 IST: Half-time Brazil 0-2 Belgium.
00:15 IST: Brilliant defensive play for Belgium, not giving Brazil any space to make the most of their attacks and ease past their defenders inside the box. One minute added for half-time.
00:12 IST: SAVE! Alisson jumps to push the ball over the cross-bar, which came off a de Bruyne shot which was dipping in as Belgium get a corner but Kompany back-heel has been well collected by Alisson. 42 minutes played.
00:09 IST: Belgium in the mood here, Hazard eases past the Brazil midfielder as Lukaku gets a back-heel before Belgium play the ball back to Courtois and look to maintain possession on the ball, complete domination!
00:06 IST: Brazil still looking to maintain possession on the ball, as Gabriel Jesus in space gets a header on the ball but his poor attempt goes off target. 35 minutes played.
00:02 IST: GOAL! Kevin de Bruyne scores from outside the box through a screamer in the 31st minute to put Belgium further in the front. Brazil 0-2 Belgium.
00:00 IST: Corner for Brazil, Willian delivers. Neymar gets the last shot, which takes a deflection for another CORNER!
23:56 IST: Belgium maintain a high back-line, as Brazil force a flurry of attacks on either ends. Marcelo gets a brilliant shot from outside the box in the 25th minute but Courtois keeps it away.
23:50 IST: Coutinho runs into space, dances past the defenders and takes a shot which keeps low from outside the box, only to see it go into the safe arms of Courtois.
23:47 IST: Brazil looking to organise themselves better, but lose possession through de Bruyne as Belgium initiate another counter-attack, but fail to make the most of it.
23:44 IST: GOAL! Belgium take lead through an own goal off Fernandinho's elbow inside the box in the 13th minute, which initially came off an Vincent Kompany header.
23:43 IST: Kevin de Bruyne finds Fellaini through a lovely through ball as the Manchester United midfielder deflects it for a CORNER!
23:41 IST: Corner for Brazil, Willian delivers falls in space for Paulinho -- who makes a mockery of the shot, no power at all in that shot.
23:39 IST: Belgium break on the counter, Chadli gets the last shot on goal but goes off target. End-to-end play with Brazil making the most of the ball in the first 10 minutes.
23:37 IST: Brazil trying to contain the ball as Marcelo wins a CORNER! Neymar delivers as Thiago Silva hits the POST!
23:34 IST: Neymar delivers a fine cross, trying to find Gabriel Jesus but the ball is too close for Courtois.
23:33 IST: Kevin de Bruyne has an early shot, off target for Belgium. Clear intent from Belgium, they are going to throw the kitchen sink at this one.
23:30 IST: Kick-off! Brazil get the first-half underway.
23:25 IST: National anthems take the centre stage as both team gear up for the all-important quarter-final.
22:20 IST: Nacer Chadli and Marouane Fellaini both start for Belgium while suspended Caseimiro has been replaced by Fernandinho.
21:53 IST: Brazil board the bus for Kazan Arena, as fans stand by with high hopes of seeing their side enter the semi-finals.
21:50 IST: In the first quarter-final France went through to the semi-final as Antoine Greizmann was adjudged the man of the match.
21:30 IST: Hello and welcome to the live commentary from the quarter-finals tie between Brazil and Belgium.
But despite sailing through the group stage, Martinez's ambitious unit have their work cut out if they are to go all the way to the July 15 final in Moscow.
Third-ranked Belgium reached the quarter-finals in 2014 in Brazil but before that the last time they got so far was in 1986, when 'Little Prince' Frank Vercauteren steered them to the semi-finals before a Diego Maradona double-ended their hopes in a 2-0 defeat in Mexico.
Vercauteren said before the tournament that Russia represented "perhaps one of the last chances for this generation of players to live up to expectations, because in 2022 a lot of them won't be there".