West Ham will face Astra Giurgiu of Romania for the second-consecutive year after the clubs were drawn together in the Europa League play-off round.
The Irons defeated Slovenian side NK Domzale 4-2 on aggregate following a 3-0 victory in the first competitive match at their new Olympic Stadium home on Thursday night.
After finishing seventh in the Premier League, Slaven Bilic’s men will be aiming to join Manchester United and Southampton in the group phase of Europe’s second-tier.
It is the second season in a row that West Ham have been paired with Astra, who knocked them out in the third qualifying round in 2015.
The Romanians had started their European campaign this year in the Champions League qualifiers, but earlier this week lost out to Copenhagen in the third round.
Elsewhere in Friday’s draw, Fenerbahce of Turkey were given a tie against Swiss side Grasshoppers while Danish team Brondby tackle Panathinaikos of Greece and Czechs Slavia Prague meet Belgian outfit Anderlecht.
The play-offs will be over two legs on August 18 and 25.
Draw in full:
Astana (KAZ) v BATE Borisov (BLR)
AEK Larnaca (CYP) v Slovan Liberec (CZE)
Arouca (POR) v Olympiacos (GRE)
Dinamo Tbilisi (GEO) v PAOK (GRE)
Midtjylland (DEN) v Osmanlıspor (TUR)
Austria Wien (AUT) v Rosenborg (NOR)
Trenčín (SVK) v Rapid Wien (AUT)
Beitar Jerusalem (ISR) v Saint-Étienne (FRA)
Lokomotiva Zagreb (CRO) v Genk (BEL)
Vojvodina (SRB) v AZ Alkmaar (NED)
Maribor (SVN) v Qäbälä (AZE)
Gent (BEL) v Shkëndija (MKD)
Slavia Praha (CZE) v Anderlecht (BEL)
İstanbul Başakşehir (TUR) v Shakhtar Donetsk (UKR)
Astra Giurgiu (ROU) v West Ham United (ENG)
SønderjyskE (DEN) v Sparta Praha (CZE)
Fenerbahçe (TUR) v Grasshoppers (SUI)
Sassuolo (ITA) v Crvena zvezda (SRB)
Brøndby (DEN) v Panathinaikos (GRE)
IFK Göteborg (SWE) v Qarabağ (AZE)
Krasnodar (RUS) v Partizani Tirana (ALB)
Maccabi Tel-Aviv (ISR) v Hajduk Split (CRO)