Sweden will now face Kazakhstan on Saturday. They previously met in the group stages, when Sweden won by 11 - 2.
Bandy, which is almost like field hockey on ice, is played outdoors, unlike ice hockey, and also has a larger pitch and a round ball rather than a puck.
The Somali national squad, made up of refugees living in the Swedish town of Borlänge, was knocked out of the championships after their fourth consecutive loss in the group matches. They were beaten by Mongolia 12 - 1.