Southampton will face Dutch club Vitesse Arnhem in the third qualifying round of the Europa League, while West Ham were handed a potential tie against Scottish Premiership side Inverness Caledonian Thistle should they both progress.
Saints finished seventh in the Premier League last season and so were among the sides for Friday's draw in Nyon, Switzerland.
The fixture will see Southampton manager Ronald Koeman return to the Netherlands, where he previously managed Vitesse before moving to England.
West Ham, meanwhile, will defend a slender 1-0 lead over Birkirkara in the second leg of their second qualifying round when they head to Malta following a 90th-minute goal by James Tomkins at Upton Park.
Inverness will have to overturn a 1-0 deficit against FC Astra of Romania after losing at home in the first leg.
Aberdeen are 3-0 up in their second-round tie with HNK Rijeka of Croatia and so look on course to meet either Kairat Almaty of Kazakstan or Armenian side Alashkert in the third round.
Third qualifying round: Ties to be played July 30 and Aug. 6: