Adrian Lopez's first-half hat trick helped Spain defeat Jordan 4-2 and advance to the last 16 with first-time finalists Zambia at the Under-20 World Cup on Saturday.
Zambia upset Uruguay 2-0 in Victoria, British Columbia.
In Group F matches, Japan and Nigeria, already qualified for the second round, drew 0-0 in Victoria, and Costa Rica earned a consolation win over Scotland 2-1 in Burnaby.
European champions Spain won Group B with seven points, followed by Zambia and Uruguay with four each, and Jordan one. All but Jordan advanced.
An error by Uruguay goalkeeper Mauro Goicoechea allowed Zambia's Clifford Mulenga to score on a penalty kick 22 minutes in. Rodgers Kola doubled the lead in the 51st to put Zambia into the second round where they will face fellow African side Nigeria on Thursday.
Japan, who secured first place in Group F by drawing with Nigeria, left eight starters on the bench for the game, while Nigeria rested four.
Jonathan McDonald, whose name comes from the Highlands, scored in injury time to give Costa Rica the victory over Scotland.