An outstanding performance from the United States, inspired by Tim Howard, could not prevent American hearts being broken as Belgium finally produced a performance to match their pre-World Cup billing.
Howard - who made 15 saves - defied Belgium until extra time, when the introduction of Romelu Lukaku - his Everton team-mate last season - proved decisive with the striker creating the opening for Kevin de Bruyne's winner before scoring the second himself in a thrilling 2-1 victory.
Teenager Julian Green gave the USA hope and they had chances, but Belgium just held on.
It was the end of an admirably brave run in the tournament for Jurgen Klinsmann's men, who have won the hearts and minds of fans across the world - not least in their own country.
Belgium, who had failed to inspire in their group games, have the reward of a quarter-final against Argentina in Brasilia.
Klinsmann and his players go out with their heads held high, and could even have won it.
The statistics will tell a tale of Belgian dominance, but that will miss the story of American heroics.
From the first minute, Howard stood tall when Belgium's 19-year-old striker Divock Origi caught Omar Gonzalez flat-footed and only the keeper's outstretched foot prevented his team going behind in the very first minute.
The USA confounded expectations by fielding an attacking formation rather than keeping things as tight as possible, and that nearly paid off when Michael Bradley linked up with Clint Dempsey but he could not find the power with a clipped shot to really test Thibaut Courtois.
De Bruyne was guilty of the most glaring miss of the half when he cut back inside but sent a tame shot rolling wide of the post.
He then tried to make amends with a first-time shot but Howard held it easily.
The second half began with Belgium looking threatening and the USA relying on fortune and Howard.
Dries Mertens' looping header was flicked over the bar by Howard, Jan Vertonghen's left-wing cross evaded both De Bruyne and Origi, then Origi sent in a good header which landed on top of the crossbar.
It was not all one-way traffic however and the Belgium defence made a hash of dealing Damarcus Beasley's cross and Graham Zusi lashed in a shot that Vincent Kompany was fortunate to get in the way of.
Axel Witsel zipped a low shot not far off target before Howard once again came to the rescue to defy Origi, who would have been disappointed with his effort.
Dempsey had a shot on target as the USA tried to respond, but it was Howard saving with his feet again that kept the USA in the game. Howard was again inspirational when Mirallas' run saw Hazard given a sight of goal, but the keeper parried.
Matt Besler produced an astounding block to deny Daniel Van Buyten, before another Howard save saw the Everton keeper tip over Origi's rising drive.
With normal time running out, Kompany went so, so close to bundling it over the line, but Howard once again was equal to the challenge.
Chris Wondolowski could have snatched it for the USA but sliced horribly wide.
Belgium boss Marc Wilmots gave Lukaku a chance to make up for his disappointing tournament, on for Origi, and within two minutes of extra time starting he had made the goal.
Lukaku's strength and pace down the right opened up the USA and De Bruyne fastened on to the ball to fire in low at the far post with Howard for once beaten.
Mirallas, another Everton man, could have wrapped it up but another intervention by Howard kept it at 1-0.
That was only putting off the inevitable though as, with the USA looking done in, De Bruyne this time played in Lukaku to fire home first-time at Howard's near-post.
The game seemed over only for Green to pop up with a goal with just about his first touch, the 19-year-old Bayern Munich player beating Courtois with a volleyed finish.
At the climax, it was Courtois' turn to be the hero when he denied Dempsey at point-blank range after a brilliantly inventive free-kick by the Americans.