Image copyright HERIKA MARTINEZ/AFP

As campaigning for the 2020 election ramps up, President Donald Trump has continued to focus on immigration as a key issue, calling the number of migrants at the southern border a national security crisis. But what do the numbers say about undocumented immigrants already in the US?

New reports of unsanitary and at times dangerous conditions at migrant detention facilities along the US-Mexico border has added fuel to the immigration debate.

Democratic lawmakers have been touring the centres, describing conditions where migrants are reportedly forced to drink water out of toilets.

In June, Congress passed a bill to send $4.6bn (£3.6bn) to address the ongoing crisis at the border, amid growing outrage over the conditions.

But while the number of apprehensions at the border has been rising over the last two years, the number of undocumented immigrants in the US is decreasing, according to new analysis from the Pew Research Center.

Much of that has to do with unauthorised Mexican immigrants - many of whom are now leaving the US.

Total undocumented population dropping

Analysing US census data from 1990 until 2017, Pew reported a decline in the overall undocumented immigrant population within the US.

After a high of 12.2 million undocumented immigrants in 2007, the totals for 2017 dipped by nearly two million.

Pew attributes this decline largely to a decrease in unauthorised Mexican immigrants, with more leaving the US than entering.

Undocumented immigrant population in US 1990-2017

Image copyright ARIANA DREHSLER/AFP/Getty Images Image caption People walk towards Mexico from San Ysidro, California

Mexicans no longer the majority

The departure of Mexican-born immigrants means that for the first time in decades, they are no longer the majority demographic of undocumented residents in the US, according to Pew.

That said, they do still make up a significant share of the population at just under five million of the total 10.5 million.

Number of undocumented immigrants in the US Mexicans are no longer in the majority

Where undocumented immigrants are living

According to 2016 data, California, Texas, Florida, New York, New Jersey, Georgia and Illinois had the highest populations of undocumented immigrants.

Montana, North and South Dakota, Wyoming, West Virginia, Maine and Vermont had around 5,000 or fewer undocumented residents.

In 2017, more states saw drops in undocumented population

The decline in undocumented immigrants is apparent across the country, even in five out of the six states with the largest populations of these immigrants.

Five states did see rises in their undocumented populations compared to 2007: Louisiana, Maryland, the Dakotas and Massachusetts.

Image copyright Getty Images Image caption Migrants are loaded onto a bus by US Border Patrol agents after being detained when they crossed into the United States from Mexico

Changing make-up of immigrants arriving in the US

As evidenced at the border, the demographics of undocumented migrants arriving in the US are changing.

The number of Central American migrants - particularly from the Northern Triangle region of Guatemala, El Salvador and Honduras - is on the rise.

But 2017 still saw fewer unauthorised arrivals than 2007, mostly due to the drop in Mexicans entering the US.

And reports by the Department of Homeland Security note that most undocumented immigrants do not cross the US border illegally, but rather overstay their visas. In 2017, Canadians overstaying their visa made up the largest group of these migrants, followed by Mexicans.