Rob Page’s side were narrowly beaten 1-0 by Italy in Rome – Matteo Pessina’s first-half goal was enough for the Azzurri.
This means Roberto Mancini’s side finished atop Group A after winning all three of their matches as they are now on a remarkable 30-game unbeaten streak – the best joint streak in their history.
Wales sent off Ethan Ampadu at the Stadio Olimpico, but a heroic defensive effort in the second half allowed them to withstand Italian pressure.
In the other key group game, Switzerland beat Turkey 3-1 in Baku.
This meant the Swiss finished the group stage with four points, the same total as Wales.
However, the Red Dragons took second place after finishing with a better goal difference, which saw them advance to the round of 16.
Wales will now face the Group B runner-up in Amsterdam on Saturday. You can read more about it here.
You can get even more involved in WalesOnline’s Welsh football coverage by signing up to leave comments on stories, delivering your verdict, discussing the biggest news, analyzing the Euro and chatting with our journalists.
Click here to begin.
Italy: Donnarumma (Sirigu 89); Toloi, Bonucci (C) (Acerbi 46), Bastoni, Emerson; Pessina (Castrovilli 87), Jorginho (Cristante 75), Veratti; Chiesa, Belotti, Bernardeschi (Raspadori 75).
Unused subscribers: Meret, Di Lorenzo, Spinazzola, Locatelli, Insigne, Immobile, Barella.
But : Pessina 39
Yellow card: Pessina 79
Wales: Salle; Ampadu, Rodon, Gunter ; C Roberts, Allen (Levitt 86), Morrell (Moore 60), N Williams (B Davies 86); Balle (C) (Brooks 86), Ramsey, James (Wilson 75).
Subtitles not used: Hennessey, A Davies, Lockyer, T Roberts, Norrington-Davies, J Williams, Mepham.
Yellow cards: Allen 52, Gunter 79
Red card: Ampadu 55
Referee: Ovidiu Haţegan