Ukraine ran out emphatic winners over Armenia in Yerevan, a result that means Republic of Ireland can't top Group B1 of the Nations League.
An Oleksandr Tymchyk strike had the visitors a goal to the good at the break, but they asserted their superiority in the second period with goals from Oleksandr Zubkov, Danylo Ignatenko and a brace from Artem Dovbyk, adding to their tally.
The Ukrainians now know a win over Scotland at home on Tuesday will see them head the standings and be promoted to Group A for the next Nations League in 2024.
For the Republic of Ireland, the guarantee of being second seed for the Euro 2024 is now gone, though wins over Scotland and Armenia in their remaining could still see them attain the slot if results elsewhere go their way.