The opening match for Poland was against Kazakhstan on 4 September 2016, which Poland drew 2–2, taking a 2–0 lead through goals from Bartosz Kapustka and Robert Lewandowski, but they conceded two goals from Sergei Khizhnichenko in the second half. On 8 October, Poland beat Denmark 3–2 with Lewandowski scoring a hat-trick. Three days later, on 11 October, they beat Armenia 2–1, with goals from Lewandowski and an own goal from Hrayr Mkoyan. On 11 November, Poland beat Romania 3–0 with Kamil Grosicki and Lewandowski (2) scoring the goals. On 26 March 2017, Poland beat Montenegro 2–1 with Lewandowski and Łukasz Piszczek scoring the goals. On 10 June, Poland beat Romania 3–1 with a hat-trick from Lewandowski. However, on 1 September, they suffered a 4–0 defeat to Denmark, their first loss of their qualifying campaign. Three days later, they beat Kazakhstan 3–0 with goals from Arkadiusz Milik, Kamil Glik and Lewandowski. On 5 October, they trashed Armenia 6–1, with goals from Grosicki, Jakub Błaszczykowski, Rafał Wolski and a hat-trick from Lewandowski, who became Poland's record goalscorer in the match. Three days later, on 8 October, Poland officially qualified for the tournament with a 4–2 win over Montenegro; with goals from Krzysztof Mączyński, Grosicki, Lewandowski and an own goal from Filip Stojković.