Aberdeen will face Latvian side Daugava Riga in the first qualifying round of the Europa League.
The Dons' six potential opponents in the regionalised draw included Dundalk and Belfast-based Crusaders but they were paired with opponents from further afield.
The opening tie is scheduled to take place at Pittodrie on July 3 with the return leg a week later, although the final details are yet to be confirmed.
Aberdeen played in the Latvian capital 20 years ago in the UEFA Cup but were on the end of a shock exit at the hands of Skonto Riga in the second preliminary round, going out on away goals following a 1-1 draw at Pittodrie.
Daugava currently sit seventh in the 10-team Latvian league, 20 points behind leaders Skonto with 17 games played. They moved to the capital in 2012 after changing their name from FK Jurmala.
Unseeded Daugava recently announced the signing of two former Liverpool reserves - Senegalese left-back Emmanuel Mendy and Brazilian striker Vitor Flora.
Aberdeen will play Dutch side Groningen if they get through.
St Johnstone have been handed a game against Swiss side Lucerne in the second qualifying round, while seeded Motherwell will play the winners of the tie between Bangor and Stjarnan.
In the first round, Linfield were handed a tie against Faroese side B36 Torshavn while Derry City face Aberystwyth Town. Linfield will face AIK of Stockholm if they beat their Faroese opposition and Dundalk have the incentive of a second-round clash with Hajduk Split.
Crusaders take on Ekranas of Lithuania while Glenavon take on FH Hafnarfjordur of Iceland.
Welsh seeds Bangor City have been given a tough game against Icelandic league leaders Stjarnan while Airbus UK Broughton take on Norwegian side FK Haugesund.
Sligo Rovers play Lithuanians FK Banga while Dundalk face Jeunesse Esch of Luxembourg.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article