West Ham will face Dinamo Zagreb, Genk and Rapid Vienna in Group H of the Europa League.
The Hammers are in European competition for the first time since the 2006-07 season and their toughest test will be Zagreb, who beat Tottenham in last season’s round of 16.
They will also go head-to-head with the Belgian side Genk as well as the Austrian outfit Rapid Vienna.
The group stage kicks off on September 16.
Leicester, who missed out on Champions League qualification on the final day of last season, are back in the Europa League for the second year running, having been knocked out in the last 32 in 2020-21.
The Foxes face Napoli, Spartak Moscow and Legia Warsaw in Group C.
Rangers are back in this competition after failing to make it through the Champions League qualifiers.
They were controversially beaten by Slavia Prague last season and they will return to the Czech Republic capital, having been drawn in Group A against Lyon, Sparta Prague and Brondby.
Celtic are in Group G with Bayer Leverkusen, Real Betis and Ferencvaros.
The 2021/22 Europa League group stage is set! 🤩
— UEFA Europa League (@EuropaLeague) August 27, 2021
Europa League draw in full:
Group A: Lyon, Rangers, Sparta Prague, Brondby
Group B: Monaco, PSV Eindhoven, Real Sociedad, Sturm Graz
Group C: Napoli, Leicester City, Spartak Moscow, Legia Warsaw
Group D: Olympiakos, Eintracht Frankfurt, Fenerbahce, Royal Antwerp
Group E: Lazio, Lokomotiv Moscow, Marseille, Galatasaray
Group F: Braga, Red Star Belgrade, Ludogorets, Midtjylland
Group G: Bayer Leverkusen, Celtic, Real Betis, Ferencvaros
Group H: Dinamo Zagreb, Genk, West Ham, Rapid Vienna