Except for a period during and in the years after World War II, neither Ireland nor the UK have placed restrictions on travel between each other for citizens resident in each others states since Irish independence. Even during wartime, when Ireland remained neutral and the United Kingdom was a belligerent during World War II, the only significant restrictions on travel between the states were an Irish prohibition on the wearing of military uniforms by British citizens when in Irish territory and the instatement of passport controls between Great Britain and the island of Ireland. When Ireland suddenly declared itself a republic in 1949, thus making it impossible to remain in the British Commonwealth, the UK government legislated that even though the Republic of Ireland was no longer a British dominion, it would not be treated as a foreign country for the purposes of British law.