Wales eased to a comfortable win in Azerbaijan to set up a winner-takes-all match with Hungary for automatic qualification for Euro 2020.
Kieffer Moore headed the dominant visitors into an early lead, which was doubled when Harry Wilson, of Bournemouth, nodded into an empty net after Daniel James' fierce swerving shot rebounded off the crossbar and post.
Wales maintained their control in the second half and, although Moore and Wilson missed the best chances to extend their advantage, it mattered little as Ryan Giggs' side coasted to victory.
Croatia secured top spot in Group E by beating Slovakia 3-1 on Saturday, meaning Wales can take the second qualifying place with a win over Hungary in Cardiff on Tuesday. Hungary's one-point advantage over Wales means a draw is enough to see them through.