STOCKHOLM, Sweden (AP) _ Substitute Mats Magnusson scored a dramatic goal with seconds left Wednesday night to salvage a 2-2 tie for Sweden with World Cup-bound West Germany in a European Group 2 soccer qualifier.

The draw virtually clinched a berth for West Germany in next year's World Cup finals in Mexico on superior goal difference, since the team is up by 14 goals.

The Germans, runners-up in the 1982 World Cup in Spain, led 2-0 at half- time. Striker Rudi Voeller opened the scoring in the 22nd minute. With only four minutes left of the first half, Matthias Herget made it 2-0 for the Germans. Pierre Littbarski set up both goals.

Dan Corneliusson, who plays for Como in the Italian League, pulled one back for Sweden in the 63rd minute as the hosts put the pressure on in the second half. They had plenty of chances to tie it before Magnusson's last-ditch effort.