Brazil thumped Costa Rica 5-2 on Thursday to reach the World Cup's second round with a maximum nine points and eliminate their brave opponents in an exhilarating game.
The four times champions, favourites for another world title after the exit of France and Argentina, played some brilliant football in the first half and scored five goals in a finals match for the first time since the 1958 final against Sweden.
They led 3-0 with an own goal and one each for Ronaldo and Edmilson, but Costa Rica pulled one back through Paulo Wanchope late in the first half and made it 3-2 from a Ronald Gomez header.
Two goals in two minutes for Rivaldo and Junior settled the issue but Costa Rica, needing a draw or a narrow high-scoring defeat to go through, had several more opportunities as they carved through a ragged Brazilian defence.
However, they could not get the extra goals they needed and bowed out of the tournament with four points behind Turkey.
Brazil, with earlier victories over Turkey and China, followed Spain as the second team to qualify with maximum points and will play Japan, Russia or Belgium in the second round.
Costa Rica had the first clear chance when Mauricio Wright headed over the bar after nine minutes.
But instead of taking a shock lead, within a minute Costa Rica fell behind when defender Luis Marin, desperately trying to beat Ronaldo to a low Edilson cross, poked the ball into his own net.
Three minutes later it was 2-0 as Ronaldo seized on some hesitant defending by Harold Wallace after a near-post corner to score his third goal in three games with a low shot.
Walter Centeno then sliced horribly wide from close range and Wright headed over again after slack marking from the Brazilian defence.
Edmilson then gave a lesson in finishing seven minutes before the break, swivelling mid-air to score with a spectacular overhead kick from a deflected Junior cross.
Costa Rica pulled one back almost immediately when striker Paulo Wanchope played a clever one-two with Wright before scoring with a deflected low shot.
In first-half injury time Rivaldo hammered a free-kick against a post, Junior hitting the rebound inches wide.
Two great tackles by Gilberto Martinez soon after the restart prevented further Brazilian goals and Costa Rica took heart and launched a series of attacks.
Anderson Polga cleared a Wanchope shot off the line and goalkeeper Erick Lonnis tipped over a rising Carlos Castro shot.
The pressure paid off in the 56th minute when second-half substitute Steven Bryce clipped in a superb cross from the right which Ronald Gomez met with a diving header.
That strike could have been enough to send Costa Rica through on goals scored but their dreams disappeared as Brazil struck twice in two minutes.
In the 62nd Rivaldo turned in a low Junior cross then Junior himself added the fifth with a firm shot from 10 metres.
Still Costa Rica came back, Wright agonisingly unable to force in the rebound after a mis-hit Junior clearance struck a post and Rolando Fonseca shooting inches wide.