Sweden's next chance arrived in the 12th minute when Granqvist headed towards Berg inside the Mexico box, but the striker saw his overhead kick drop wide of the post.
Andersson has masterminded Sweden's progress to the knockout stages as winners of Group F with Mexico also going through as runners-up as holders Germany crashed out with South Korea.
But Osorio, relishing the improvement in the team's performances that has helped to silence his many critics at home, said Mexico would stay true to the brand of play that led them to a stunning 1-0 win over Germany and a 2-1 victory over South Korea.
"I'm incredibly proud of the team, they were so disciplined and they were so loyal".
It allowed Sweden to relax and they doubled their lead after 62 minutes through Granqvist's second spot-kick of the tournament.
Zlatan Ibrahimovic questioned Sweden prior to their must-win encounter at the World Cup. A draw would guarantee El Tri a birth in the next round, but a multiple goal loss, combined with a multiple goal win for Germany, would see them in third place in Group F.
Andersson said that set-pieces could play an important role for Sweden on Wednesday. "That match made us stronger, more confident". Mexico has been to the round of 16 for seven straight World Cups.
Zsa Zsa, the English bulldog, wins World's Ugliest Dog title
A 125-pound gentle giant Martha, a Neopolitan Mastiff with gas and a droopy face, won last year's competition. Ms Brainard found Zsa Zsa , who has an underbite and a noticeably long tongue, on a pet search website.
It could have been worse for Mexico, who started badly and never recovered, and Sweden were denied what looked a strong call for a penalty on 30 minutes.
With the game fading into injury time and Sweden certain of victory, Mexican fans began to think what was before the game unthinkable - possible elimination.
Mexico entered the match as favourites to win but it was Sweden that flourished in the game.
"We hadn't done any sort of mathematical calculations", Ochoa said at a news conference.
Left-back Ludwig Augustinsson took advantage of a miscued shot from Forseberg to score an important goal for his team.
Fabian went close with a shot from distance which deflected just over, but then Mexico imploded as Alvarez bundled the ball into his own net to make it 3-0 to Sweden.
As the runner-up of Group F Mexico meets victor of Group E Monday in Samara.
Mexico will lament its missed chances early.