Switzerland stunned Belgium as they came from two goals down to win 5-2 and pip their opponents for a place in the Nations League Finals in a remarkable match in Lucerne.
Trailing to two strikes from Thorgan Hazard, younger brother of Chelsea's Eden, the hosts struck back with a Haris Seferovic hat-trick and some inspiration from Liverpool forward Xherdan Shaqiri.
It allowed the Swiss to snatch top spot in in Group A2 courtesy of a superior head-to-head record and join Portugal and England in next summer's finals, with the final berth between France and Holland to be decided on Monday.
Belgium, who needed only a draw to progress, looked to be coasting home after Hazard's two goals in the opening 17 minutes.
However, Ricardo Rodriguez's penalty got Switzerland back into the game and by half-time they were ahead after Seferovic twice found the target.
Switzerland needed to win by two clear goals to achieve their target and just past the hour Nico Elvedi gave them the daylight they needed as Belgium conceded four goals for the first time in eight years.
But the hosts were not content to sit on their advantage and six minutes from time Seferovic completed his treble.
World Cup finalists Croatia also conceded a lead given to them by Andrej Kramaric to lose 2-1 to England at Wembley.
Jesse Lingard and Harry Kane scored in the final 12 minutes for Gareth Southgate's men, who finished top of Group A4 ahead of Spain with Croatia - who would have been first with a victory - relegated.
Austria, who already knew they would finish second in Group B3, beat relegated Northern Ireland 2-1 thanks to a stoppage-time winner from Valentino Lazaro.
Xaver Schlager's opener just after the interval was cancelled out by Corry Evans only for substitute Marko Arnautovic to set up Lazaro's winner in the third extra minute.
In Group D2 Belarus confirmed their promotion with a 2-0 win over San Marino with goals from Stanislav Dragun and Anton Saroka.
That rendered Luxembourg's result irrelevant as they drew 1-1 in Moldova with Stefano Bensi cancelling out Radu Ginsari's penalty for the hosts.
Promoted Finland lost 2-0 to Hungary in Budapest, with the other match in Group C2 seeing Greece lose 1-0 to already-relegated Estonia.