The shock was on in the 62nd minute when defender Nico Elvedi made up for a bad early error to put Switzerland 4-2 up with a glancing header.
Seferovic sealed the victory by getting his third with a header in the 84th after Shaqiri’s trickery set up Kevin Mbabu for a cross.
Switzerland won Group 2 in League A on the head-to-head record because both teams had nine points from four games, and Belgium beat the Swiss by just 2-1 in Brussels last month. Iceland placed last and is relegated.
The tiebreaker option seemed moot when Thorgan Hazard scored after 66 seconds and again in the 17th minute.
But Switzerland struck three times in an 18-minute spell before halftime, and kept up the pressure in the second half.
A wild match played out in a noisy, intimate 16,000-capacity stadium in Lucerne gave Swiss fans what they looked for after an infuriating World Cup exit in July, in a lackluster 1-0 Round of 16 loss to Sweden.
The game also recalled Belgium’s stunning 3-2 comeback win over Japan in its World Cup round of 16 — only this time it was the Red Devils wasting a two-goal lead.
Belgium quickly led when captain Eden Hazard’s brother Thorgan seized on a bad mistake. Thorgan Hazard had been offside when a forward pass went directly to Elvedi, but the defender misplayed the ball behind him into space. Thorgan Hazard, now onside because of the opponent’s pass, pounced to flick the ball over goalkeeper Yann Sommer.
In the 17th, Thorgan Hazard was allowed to move into the Swiss penalty area and fired an angled shot past Elvedi and the diving Sommer, his teammates at Borussia Moenchengladbach.
Switzerland now had to score at least four goals to edge the tiebreaker — and had three by halftime.
A penalty by Ricardo Rodriguez in the 26th was awarded for Nacer Chadli’s foul on right-back Mbabu. Minutes later Rodriguez crossed for Shaqiri to guide a header across the goalmouth for Seferovic to tap in as Courtois scrambled in vain.
Seferovic then swept in a curling shot with his weaker right foot. He now has 17 goals for Switzerland one year after he was booed off the field by home fans in a World Cup playoff despite the team advancing.
Belgium’s capitulation had echoes of a 3-1 loss to Wales in the Euro 2016 quarterfinals. It leaves this team still seeking a trophy to justify the “Golden Generation” label that is often a curse in world soccer.
More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports