BELO HORIZONTE, Brazil — With Neymar out injured, just about everyone in Brazil knew it would be tough against Germany.
Nobody ever expected this.
The Germans tore apart Brazil’s porous defense time and time again Tuesday, routing the hosts, 7-1, in the World Cup semifinals, the largest margin of defeat at this stage in tournament history.
‘‘We wanted to make the people happy . . . unfortunately we couldn't,’’ said Brazil defender David Luiz, who had scored in each of the last two matches. ‘‘We apologize to all Brazilians.’’
The astounding scoreline is sure to overshadow Miroslav Klose’s record-setting 16th career World Cup goal. The strike pushed Klose past Brazil great Ronaldo, who was at the Mineirao Stadium working the game as a TV commentator as the Germans advanced to their eighth World Cup final.
Germany will face either Argentina or the Netherlands on Sunday at the Maracana Stadium in Rio de Janeiro with a chance to win for the fourth time.
Brazil was playing without Neymar, the team’s key player and the poster boy for the World Cup. He scored four goals in the group stage, but Brazil’s attack seemed to get weaker and weaker as the tournament progressed. The Barcelona striker was ruled out of the tournament with a broken vertebra after getting kneed in the back in the quarterfinal win over Colombia.
With Neymar sidelined and Thiago Silva suspended, the collective hopes of a nation remained high even if expectations were lowered.
The atmosphere at the start of the match was spine-tingling, but the euphoria of the yellow-shirted thousands soon turned to tears as the Germans scored five goals in the first 30 minutes — four of them in a six-minute span.
‘‘It was very important to stay calm, cool and courageous in facing Brazilian passion,’’ Germany coach Joachim Loew said.
The loss matched Brazil’s most-lopsided defeat ever, and it’s the first time the team has lost in an official competitive match on home soil since 1975, when Peru won, 3-1, at the same stadium in the Copa America. Its last loss at home came in a friendly with Paraguay in 2002.
Previously, Brazil’s biggest World Cup loss was 3-0 to France in the 1998 final. In 1920, in the South American championship, the predecessor of the Copa America, Brazil lost to Uruguay, 6-0.
‘‘The responsibility for this catastrophic result is mine,’’ Brazil coach Luiz Felipe Scolari said. ‘‘I was in charge.’’
It was Germany’s biggest World Cup win since routing Saudi Arabia, 8-0, in a group match in 2002.
On Tuesday, with Bernard playing as the third striker in the place of Neymar, Brazil attacked from the start. But it failed to get any solid chances, and it wasn’t long before the Germans opened the defense and started the rout.
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.
‘‘Brazil was shocked after the goals, they did not expect that. They did not know what to do,’’ Germany coach Joachim Loew said. ‘‘Their defense was not organized. A little humbleness would not hurt now.’’
Klose scored his record goal in the 23d minute to make it 2-0. The German had his original shot saved, but he followed up as goalkeeper Julio Cesar spilled the ball, easily scoring from the rebound.
The 36-year-old Lazio striker, playing at his fourth World Cup, also scored in Germany’s 2-2 draw with Ghana in the group stage when he came off the bench to get Germany back into the contest.
Given the occasion, a special celebration was surely in the works. But Klose refrained even from doing his trademark back flip to mark the goal, which came in his 23d World Cup match.
‘‘I got hit in my left foot while attempting a shot and I was not able to do the flip,’’ Klose said.
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.
‘‘Today 10 minutes went wrong in the game and Germany did really well,’’ Scolari said. ‘‘It’s a chaotic and terrible defeat . . . but we have to learn from it.’’
Schuerrle, who came on for Klose in the 58th minute, scored from a cross by Lahm in the 69th, and then knocked a shot off the underside of the crossbar and into the net in the 79th.
It’s 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.
In previous World Cup semifinal matches, the largest margin of defeat was five goals, occurring on three occasions.
‘‘The German quality is very, very high,’’ Scolari said. ‘‘This is not normal.’’