A ban on travelling to Wales from coronavirus hotspots elsewhere in the UK comes into effect on Friday evening.
First Minister Mark Drakeford asked Prime Minister Boris Johnson twice to stop people in areas of England with high coronavirus rates from travelling.
But after receiving no reply, the first minister used devolved powers to shut Wales’ borders to people from hotspots.
The ban will cover all of Northern Ireland, England’s tier two and three areas and the Scottish central belt.
The UK government’s Welsh Secretary Simon Hart said the decision risks “stirring division and confusion”, but Scotland’s First Minister Nicola Sturgeon said she fully supported Mr Drakeford’s move.
There was a warning from the head of the Police Federation in Wales that the rules could be “unenforceable”.
The first minister said the police will have extra patrols on main roads into Wales.
As is the case within Wales, there are reasonable excuses for travelling in and out of locked down areas, including to go to work, school and to provide care.
Announcing the ban, Mr Drakeford said: “Evidence from public health professionals suggests coronavirus is moving from east to west across the UK and across Wales.
“As a general rule, it is concentrating in urban areas and then spreading to more sparsely populated areas as a result of people travelling.”
Mr Drakeford said the law will be “essentially designed to prevent people going to those holiday parts of Wales, the far west and the far southwest of Wales, where the virus is still in very low circulation”.
The rules come into force at 18:00 BST.