Northern Ireland will face Switzerland in the World Cup play-offs, while Republic of Ireland will take on Denmark.
Both home nations were unseeded for the draw, which was made in Zurich on Tuesday.
Michael O’Neill’s Northern Ireland finished second to Germany in Group C to secure a play-off berth, while Martin O’Neill’s Republic of Ireland beat Wales last week to seal their spot as runners-up in Group D.
They will be both be relieved to have avoided Italy, who were drawn against Sweden, while the other European play-off tie will see Croatia take on Greece.
The first legs will be played from November 9 to 11 and the second legs between November 12 to 14.
World Cup European play-off draw:
Northern Ireland v Switzerland
Croatia v Greece
Republic of Ireland v Denmark
Sweden v Italy