Italy have topped their group in the European Championship after a third straight win on Monday (NZ time).
A first-half goal from Matteo Pessina has given them a 1-0 victory over 10-man Wales, who also advance to the knockout stages of the competition.
The Italians had already guaranteed their progress, while Wales secured a berth too by finishing ahead of Switzerland on goal difference. The Swiss, who could still advance as one of the four best third-placed teams, beat Turkey 3-1 in Baku.
Italy manager Roberto Mancini made eight changes to rest most of his first-choice starters, but Italy still dominated and missed several chances either side of Pessina's 42nd-minute goal, when he steered a low Marco Verratti free kick into the far corner.
Welsh centre back Ethan Ampadu was shown a straight red card in the 55th minute for stamping on Federico Bernadeschi's foot, and Wales then missed their best chance of an equaliser in the 74th when Gareth Bale volleyed over the bar from close range.
Italy will next face the runners-up of Group C, while Wales will take on the runners-up of Group B.
In the day's other tie, Xherdan Shaqiri scored two superb goals, as Switzerland secured third place in Group A with a 3-1 win over Turkey, but they now face an anxious wait to see if they will reach the last 16.
The Swiss, who finished level on four points with Wales but behind on goal difference, will hope to secure a spot in the knockouts as one of the four best third-placed finishers from the six groups.
Turkey - who finished fourth with three defeats - were tipped pre-tournament as dark horses, but will head home after a dismal effort in the group stage.
The game encapsulated Turkey's tournament, as they began full of fire and fury and started at a scintillating pace, only to collapse quickly as Switzerland outmanoeuvred them tactically to take an early lead.
The Swiss took the lead when Haris Seferovic received a pass from Steven Zuber on the edge of the area before rifling the ball into the bottom right corner in the sixth minute.
Exasperated, Turkey regrouped and tried again, but they went 2-0 when Zuber found Shaqiri in a similar position, and he curled an exquisite shot beyond the despairing dive of Ugurcan Cakir 20 minutes later.
For Turkey it was a dispiriting end to the as their talent-filled squad proved toothless in attack, in stark contrast to an effective Swiss outfit that may just live to fight another day.