Germany, the 2014 champions, Confederations Cup champions and FIFA's top-ranked team, were eliminated at the first hurdle for the first time since 1938.
Ludwig Augustinsson put the Swedes ahead five minutes into the second half before Marcus Berg won a penalty and Sweden captain Andreas Granqvist, who scored the victor from the spot against South Korea, stepped up to take it.
The 58-year-old, who took over in 2006 and recently signed a contract extension through to 2022, said he was taking responsibility for the premature exit after losses to Mexico and South Korea in the group stage. "We believed until the end today".
Mexico will aim to cement their place at the top of Group F while Sweden will battle for survival in what could be a tricky World Cup clash at the Ekaterinburg Arena on Wednesday.
"But we now are out and, of course, it's a case of absolute sadness and disappointment, but I think we have young players who are very talented and who have the opportunity to go forward".
"We deserved to be eliminated", Germany coach Joachim Loew said. It happened to other nations before.
Apple, Samsung End Years-Long Battle Over Copied iPhone Design
The Apple vs Samsung legal battle that has spanned seven years and numerous courtroom showdowns is finally over. Samsung paid $548 million of the $1.05 billion owed to Apple in 2015, but appealed all the way to the U.S.
England march into last 16 after thrashing Panama 6-1
Both Poland and Colombia lost their opening match, to Senegal and Japan respectively, and could be eliminated with another loss. Robert Lewandowski desperately needs to discover the form he showed in qualifying for Poland to have any chance of advancing.
Can Lionel Messi save Argentina at the 2018 World Cup?
Lovren has revealed that the reserve players have twice beaten the first team in Croatia practice matches at their training base. The Barcelona forward missed a penalty against Iceland and then touched the ball just 47 times in the Croatia loss.
That was the problem, for Germany.
Mexico have been one of the biggest attractions of this World Cup.
Germany made a nervous start, playing slower than it usually does to avoid being vulnerable on the break. The Swansea midfielder is South Korea's most experienced player, with 104 appearances with the national team. The Germany keeper bobbled the ball and needed to swipe the rebound away from the attackers after a spectacular dive.
Here, Press Association Sport takes a look at some other England-based players also checking out of Russian Federation following the group stage. Germany has conceded goals in its past seven matches and has been vulnerable to counterattacks since the start of the tournament.
Gomez had a decent header stopped by Jo in the 68th minute and could not properly connect with a low cross from Kimmich in the 72nd as Germany's hopes vanished. But the team never really seemed to recover from its opening 1-0 loss to Mexico. Their title defence began with a catastrophic 5-1 loss to Holland - the team they had beaten in the 2010 final - and they were out two games in when Chile defeated Vicente Del Bosque's men 2-0.
The gamble backfired as Mexico came out flat and was overrun in the second half when Sweden scored three goals in 24 minutes to open up a 3-0 lead.