Scotland will face hosts Germany, Hungary and Switzerland in the group stage of the European Championships finals next summer.
Manager Steve Clarke and his players learned their fate as the draw for the finals took place in the Elbphilharmonie in Hamburg, one of the German host cities.
Scotland were in the third seeding pot for the finals, with Germany picked from the top-tier seeds, Hungary from the second group and Switzerland from the bottom seeds.
The national team will begin their campaign against the hosts in the opening game at Munich’s Allianz Arena on June 14.
That match will be followed with a clash with Switzerland in Cologne five days later.
The group stage campaign will conclude against Hungary at the MHP Arena in Stuttgart on June 23.
Scotland manager Steve Clarke said it was an “exciting” draw and he aims to make his side competitive in all three games.
“It’s nice to open the tournament and nice to be involved in that first game and hopefully we can set the tournament off with a good match,” he told the BBC.
“We’ve got to make sure it’s not about the occasion and it’s about the match. We look forward to it, it’s an exciting draw.
“I don’t think it mattered who we were going to get, it was always going to be exciting for us. (It is) nice to be involved in the draw process and (we are) looking forward to next summer now.”
Some Scotland fans have already secured tickets for matches in Germany through the first UEFA ballot but didn’t know what opposition they would be seeing at the time of purchase.
The second phase of ticket sales begins on December 6 and only members of the Scotland Supporters’ Club be eligible to apply.
UEFA has made 10,000 tickets available for each game and priority will be given to fans who have accumulated 12 loyalty points or more, with the remainder allocated on a sliding scale until all are sold.
Scotland will warm up for the tournament with a series of friendlies in the first half of next year. Clarke is planning for two matches in the March international window, with one expected to be against a top-seeded side.
Another one or two games will be scheduled for June before the tournament begins.
Details of Scotland’s training base in Germany have yet to be revealed, and Clarke will have to submit his final 23-player squad for the finals seven days before the team’s opening game.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country