Germany poured in the goals to hand Brazil their heaviest World Cup loss ever with an astounding 7-1 rout in the semi-finals that stunned the host nation.
Miroslav Klose scored a record-setting 16th career World Cup goal in a five-goal spurt in the first half as Brazil's defence was torn apart.
The Germans reached their eighth final and will face either Argentina or the Netherlands at the Maracana Stadium in Rio de Janeiro.
Previously, Brazil's biggest World Cup loss was 3-0 to France in the 1998 final.
We apologise to all Brazilians.
This matched their biggest ever margin of defeat in any competition, equaling a 6-0 loss to Uruguay in 1920 in the South American championship, the predecessor of the Copa America.
"We wanted to make the people happy ... unfortunately we couldn't,'' Brazil defender David Luiz said. "We apologise to all Brazilians.''
It is also Brazil's first loss in a competitive match on home soil since 1975, when Peru won 3-1 at the very same Mineirao Stadium in the Copa America. Its last loss at home came in a friendly with Paraguay in 2002.
"We did what we thought was best,'' said Brazil coach Luiz Felipe Scolari. "Please excuse us for this mistake. I'm sorry we could not get to the final.''
Brazil's attack was weakened by the loss of Neymar, who fractured a vertebra after getting kneed in the back in the quarter-final win over Colombia. But it was Brazil's porous defence that was the biggest problem in the first half as the host also sorely missed suspended captain Thiago Silva.
Brazil attacked from the start but they failed to get any solid chances, and it was not long before the Germans opened up the defense and started the rout.
- Klose's 16 World Cup goals means he overtakes Brazil's Ronaldo.
- Germany scored five goals in the first 29 minutes, the fastest any team has scored five goals in World Cup history.
- Brazil's six-goal defeat equals their worst loss in team history - 6-0 to Uruguay in the 1920 Copa America.
- The last time Brazil lost a World Cup match at home was the 1950 final, which caused the team to change their kit.
Toni Kroos and Andre Schuerrle scored two goals each, while Thomas Mueller and Sami Khedira added the others. Oscar pulled a late goal back for Brazil.
"The space we had was bigger than against defensive teams,'' Mueller said.
"Now we have to pull it off one more time and lift the thing. We should keep our feet on the ground.''
It was Germany's biggest World Cup win since routing Saudi Arabia 8-0 in a group match in 2002.
Klose scored his record goal in the 23rd minute, pushing him past Brazil striker Ronaldo's 15 career World Cup goals. The German had his original shot saved, but he followed up as Brazil goalkeeper Julio Cesar spilled the ball, easily scoring from the rebound.
Kroos scored his first goal in the 25th minute, knocking in a cross from Philipp Lahm that bypassed Mueller in the middle. He made it 4-0 a minute later, beating Cesar after a defensive mistake from Fernandinho left the ball on the feet of Khedira.
Mueller scored the first goal, one-timing a corner from Kroos past Cesar in the 11th minute. Khedira made it 5-0 in the 29th, taking a pass from Mesut Ozil and again beating Cesar.
Schuerrle, who came on for Klose in the 58th minute, scored from a cross by Lahm in the 69th minute, and then knocked a shot off the underside of the crossbar and into the net in the 79th minute.
It is the first time Brazil had allowed five goals in a World Cup match since the 1938 tournament in France, when the team beat Poland 6-5 in extra time.