Like many “extraordinary measures” implemented in times of crisis – often under the guise of security – the supposedly temporary restrictions on free movement at the start of the First World War became permanent features hindering migration.

From that time onwards, a growing number of countries required identity documents, passports and visas for travel. When the war ended, negotiations failed to re-open borders. Despite Japanese, Chinese and Indian demands for the free movement of labour, the new League of Nations failed to abolish the new passport system or liberalise controls on international migration.

Passports and citizen identification soon became hallmarks of the modern nation state. By the time decolonisation took place in the mid-20th century, passports and visas were widespread. New states followed the example of established ones. All of a sudden, people could no longer cross a border without a document that included their photograph, birthplace and nationality.

War, nationalism and state-building required large and elaborate bureaucracies, which were tasked with regulating migration flows. Quotas as well as passports and other new forms of border control were introduced to restrict how many people entered a country, where they come from, and what rights and resources they could access.

Political ideas of national security, culture, language and race became as influential for immigration and migrant flows as economic policies had been in the nineteenth century. States increasingly allocated citizenship rights on the basis of nationality, making it necessary to belong to a state to be officially recognised and so able to move and work.

A growing preoccupation with managing the movement of people was entwined with exclusionary attitudes based on race and ethnicity. Economic failure and other social problems were blamed on foreigners, and migration began to be seen by some as a form of deviant behaviour. Elaborate hierarchies of race, ethnicity and nation were built across Europe and its settler colonies, drawing on a misreading of Darwin’s widely publicised ideas. “Social Darwinism” was used to justify establishing a highly stratified society with white northern Europeans at the apex.

The perceived threat to social order posed by immigrants, along with pseudoscientific theories of race and media-inflamed prejudices, combined to generate a growing suspicion of “foreigners” during the late nineteenth and early 20th century. These were increasingly given expression in discriminatory immigration policies, expulsions, savage pogroms and populist purges.

In 1905, Australia implemented a “dictation test” which required a prospective immigrant to write down 50 words in any European language of the immigration officer’s choosing, including Gaelic. Anyone who failed the test could be deported. The test was used to enforce the recent Immigration Restriction Act, which became a cornerstone of the unofficial “White Australia” policy.

Other countries tightened up their entry requirements. In 1917, France started requiring all foreigners to carry a form of identification with a photograph, indicating the bearer’s nationality and occupation. Germany and Britain introduced similar regulations to identify foreigners. The United States also policed its borders more aggressively; in 1917 it too introduced a literacy test that had to be passed by all migrants.

In earlier centuries, governments had tried to control who left the country. Migration policies from the mid-1800s began to focus on who was allowed in.

The US viewed – and still views – their populations as a valuable source of taxation, labour and military or economic power. Private employers similarly kept their workers close, often coercively. In the seventeenth and eighteenth centuries, some European states discouraged or forbade emigration. Feudal Japan prescribed the death penalty for those who left the country without permission.

While concerns over people leaving never went away, governments after the First World War became much more preoccupied with restricting entry. The change in attitude also reflected changes in the origins and destinations of migrants and their reasons for moving.

With the rapid growth of industry and a gradual decline in birth rates, north-western European economies became migrant destinations rather than sources of labour. While migrants had previously travelled from wealthier countries in Europe to the less prosperous regions of the world and more distant colonies, after the First World War, a growing proportion of migrants came from poorer parts of southern and eastern Europe, typically moving north or embarking for Canada, Australia, Argentina, Brazil and New Zealand.

In earlier centuries, private enterprises such as the Dutch East India Company and institutions such as the Church had helped to shape global patterns of migration. Identity cards and passports now allowed nation states to choose who got to come and go. By regulating the free movement of people, governments could also decide what resources, jobs and social services people had access to.

There was another, unintended consequence: large groups of people suddenly found themselves without a state from which they could derive rights and protection. The emergence of a more rigid interstate system led to the rise of stateless people and refugees.

While wars and famine may have caused them to flee, refugees were also the product of increasingly rigid legal definitions of citizenship and impenetrable borders. A combination of state sovereignty and strict identification of citizens made “foreigners” legal outsiders, as the sociologist Saskia Sassen has highlighted in her work. Refugees became a distinct, institutionalised category excluded from the rights offered to citizens. Deprived of citizenship, they became trapped in legal limbo, denied the right by many countries to work, vote, travel or access services offered to citizens.

In the interwar years, rising nationalism was coupled with protectionism. Industries that felt threatened by rival manufacturers abroad lobbied their governments to impose tariffs on imported products. Similarly, trade unions fearing competition from foreign labour sought to limit migrant numbers and curtail the rights of foreign workers to remain and access social services.

In the United States, debates around “Americanisation” and immigration have driven politics for over 150 years. Under the Burlingame Treaty of 1868, an early version of the “guest worker” programmes that would appear in other parts of the world, Chinese workers were given the right to work in the US – albeit under certain restrictions.

Shifting public attitudes towards foreigners were accompanied by more stringent legislation in the decades that followed. In 1882, the US passed laws curbing the entry of Chinese workers, as well as those perceived to pose potential threats to ‘national interests’, including ‘convicts, lunatics, idiots, and persons likely to become public charges’.

Immigration policy became more centralised under institutions dedicated solely to the task of identifying and preventing the entry of a growing list of people deemed unsuitable for entry. The Immigration Act of 1924 charged American consuls overseas with administering quotas, including submitting applicants to financial checks and medical examinations before issuing visas.

In practice, the legislation extended the reach of border control to other countries, allowing the United States to restrict entry long before prospective migrants embarked in Europe or elsewhere. This was framed as benefitting travellers and protecting them from having to sell their possessions before attempting futile journeys. As immigrants increasingly attempted to cross into the US by land as an alternative to arriving by sea or by air (planes began to carry commercial passengers soon after the First World War ended), the US Border Patrol was created in 1924.

Excerpted with permission from The Shortest History of Migration, Ian Goldin, Pan MacMillan.