Romania have clinched qualification for the 2019 Rugby World Cup and will face both Ireland and Scotland in Pool A.
Spain's shock defeat by Belgium in the final round of European qualification matches means that Romania have qualified for next year's tournament.
Spain could still reach their second Rugby World Cup if they can advance through the play-off route.
Romania will now face host nation Japan in the opening match of the tournament on 20 September, 2019 in Tokyo.
- Vote for your try of the Six Nations
- Highlights: Ireland beat England to win Grand Slam
- Watch the moment Ireland celebrate Grand Slam win
Their match against newly-crowned Six Nations champions Ireland will take place at Kobe Misaki Stadium on Thursday, 3 October before they face Scotland on Wednesday, 9 October.
Spain defeated Romania 22-10 in February to take control of their qualification bid and they were favourites to secure the automatic qualifying spot from the Rugby Europe Championship after beating Belgium earlier in the campaign.
Belgium charged into an early 15-0 lead and then held off a late rally by Los Leones to clinch a controversial 18-10 victory.
Despite the defeat, Spain finished as the second-placed team in European qualification and they must now play Portugal for the right to face Samoa in a home and away play-off.