The U.S. will finish second or third and meet Russia or Finland in a quarterfinal on Thursday.
In Stockholm, the other group leader, Switzerland, defeated Belarus 4-1 to achieve its best group record at the worlds, seven wins and no losses. The Swiss hope to medal for the first time since 1953, when they were third among three teams.
Julian Walker scored twice, and Roman Josi and Mathias Bieber once each.
Switzerland was followed by Canada and Sweden. Norway and the Czech Republic are vying for the last quarterfinal spot.
Slovakia's Branko Radivojevic was handed a gift goal just 15 seconds into the game when U.S. goaltender Ben Bishop turned the puck over, trying to reach a teammate with a pass.
Martin Bartek scored 3:44 in, and Rene Vydareny made it 3-0. Danny Kristo replied for the U.S. in the second period, and Slovakia's Marko Dano added a late empty-net goal.
More Sports Headlines
Howard, Beasley called up to U.S. soccer team Phillies trade Chase Utley to Dodgers AquaSox blow 5-0 lead, come back to beat Spokane 8-6 Time with friends and family is what fishing is all about South Snohomish coach calls for changes in Series format With contract done, Seahawks' Wagner focused on football Homer-Happy Rangers Beat Mariners 7-2 Sounders beat Olimpia 2-1 in CONCACAF Champions League match
Our new comment system is not supported in IE 7. Please upgrade your browser here.