In law, an alien is a person who resides within the borders of a country and is not a national of that country, though definitions and terminology differ to some degree.
The term "Alien" is derived from the Latin alienus, meaning stranger, foreign, etym. "belonging (somewhere) else".
Different countries use varying terms for "aliens" including:a legal alien is a non-citizen who is legally permitted to remain in a country. This is a very broad category which includes tourists, guest workers, legal permanent residents and student visa resident aliens.
a nonresident alien is a non-citizen who is visiting a country, for example as a tourist, on business, entertainers, sportspeople or in the country to receive medical treatment.
a resident alien is a non-citizen who has permanent resident status in a country.
an enemy alien is a non-citizen who is a national of an enemy country.
an illegal alien or 'undocumented alien' is a non-citizen who has entered a country through irregular migration, for example entered illegally, or an alien who entered a country legally but who has fallen "out of status."
An "alien" in English law was someone who was born outside of the monarch's dominions and who did not have allegiance to the monarch. Aliens were not allowed to own land and were subject to different taxes to subjects. This idea was passed on in the Commonwealth to other common law jurisdictions.
In Australia, citizenship is defined in the Australian nationality law. Non-citizens living in Australia are either permanent residents; temporary residents; or illegal residents (technically called "unlawful non-citizens"). Most non-citizens (including those who lack citizenship documents) travelling to Australia must obtain a visa prior to travel. The only exceptions to this rule are members of the British royal family, and holders of New Zealand passports and citizenship who may apply for a visa on arrival according to the Trans-Tasman Travel Arrangement.
The British Nationality Act 1772 regulated who was to be called a British national.
The Aliens Act 1905, the British Nationality and Status of Aliens Act 1914 and the Aliens Restriction (Amendment) Act 1919 were all products of the turbulence in the early part of the 20th century.
In the United Kingdom, the British Nationality Act 1981 defines an alien as a person who is not a British citizen, a citizen of Ireland, a Commonwealth citizen, or a British protected person.
In the United States, an alien is "any person not a citizen or national of the United States." The U.S. Government's use of alien dates back to 1798, when it was used in the Alien and Sedition Acts. U.S. law makes a clear distinction between aliens and immigrants by defining immigrants as a subset of aliens. Although U.S. law provides no overarching explicit definition of the term "illegal alien," the term is used in many statutes and elsewhere (e.g., court cases, executive orders). U.S. law also uses the term "unauthorized alien." U.S. immigration laws do not refer to illegal immigrants, but in common parlance the term "illegal immigrant" is often used to refer to any illegal alien. Because at law, a corporation is a person, the term alien is not limited to natural humans because what are colloquially called foreign corporations are technically called alien corporations. Because corporations are creations of local state law, a foreign corporation is an out of state corporation. There are a multitude of unique and highly complex U.S. domestic tax laws and regulations affecting the U.S. tax residency of foreign nationals, both non-resident aliens and resident aliens, in addition to income tax and social security tax treaties and Totalization Agreements.
In Arab States of the Persian Gulf (UAE, Saudi Arabia, Kuwait, Oman, Bahrain and Qatar), many foreigners have lived in the country since birth or since independence. However these countries do not accord citizenship to many of them. As such, referring to these people as foreigners is seen by some as rude.
On Latvian passports, alien refers to non-citizens (nepilsoņi): former citizens of USSR who don't have voting rights for the parliament of Latvia but have rights and privileges under Latvian law and international bilateral treaties, such as the right to travel without visas to both the EU and Russia, which is not possible for Latvian citizens.