Italy finished top of their Euro 2020 group on Sunday as Matteo Pessina's first half goal helped a much-changed Azzurri side beat 10-man Wales 1-0 in Rome, while the visitors held on to second place despite the defeat.
The Italians had already guaranteed their progress from Group A, but they assured themselves of first place with victory, 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 are now unbeaten in 30 games, equalling their all-time best run recorded from 1935 to 1939, and kept a clean sheet for an 11th consecutive match to underline their credentials as potential tournament winners.
Pessina volleyed the dominant hosts in front at a lively Stadio Olimpico after 39 minutes as they put in an impressive display despite coach Roberto Mancini making eight changes to his starting line-up.
Wales's task was made harder when defender Ethan Ampadu was sent off in the 56th minute for a stamp on Federico Bernardeschi's ankle minutes after the Italian winger's free-kick had struck the post.
Italy's relentless pressure continued as they pushed for a second, but Gareth Bale squandered a rare chance to earn Wales a draw when he volleyed over unmarked from 12 yards.
Italy will face the runners-up of Group C next in London on June 26, while Wales will take on the runners-up of Group B on the same day in Amsterdam.
With Italy already through to the knockout stages, Mancini made eight changes to his team, a joint record number for the Azzurri between games at a major tournament.
But the new-look Italy side appeared comfortable on a hot, muggy evening in Rome.
Andrea Belotti flashed a shot wide from a tight angle, Chris Gunter headed narrowly over from a corner for the Welsh and Federico Chiesa's volley was deflected off the line during a frantic five-minute spell midway through the half.
Marco Verratti, making his first appearance at Euro 2020 after a lengthy injury lay-off, was influential in midfield and played a key role in the goal after 39 minutes as he won a free-kick on the right wing and swung it in to the near post for Pessina to finish.
It was Italy's seventh goal of the tournament, matching their best-ever tally from the 1998 World Cup after three group stage matches at a major tournament.
Mancini's side were inches away from a second early in the second half when Bernardeschi cannoned a free-kick off the foot of the post, and a few minutes later the Italy winger had his foot stamped on by Ampadu, leading to the defender's dismissal.
Wales's job got even harder when they were reduced to 10 men, and the Italian pressure continued as Belotti's close-range shot was blocked by Danny Ward.
Wales had a golden chance to snatch a draw when a free-kick was headed into the path of the unmarked Bale in the area, but the skipper blasted his finish over the bar.
Mancini made sure to give all 11 of the players who started the last game at least some rest, as Leonardo Bonucci and Jorginho were replaced in the second half and even goalkeeper Gianluigi Donnarumma was taken off in the final minute of regulation time.
WTC final PIX: Gritty New Zealand take Day 3 honours
Sachin voted 'Greatest Men's Test Batsman'
Verstappen on a roll with Red Bull after French win
SEE: Tendulkar, Hardik get nostalgic on Father's Day
Euro 2020: How Gosens inspired Germany...