On Sunday, about 200 Central Americans arrived at a border crossing near San Diego after an arduous, monthlong journey, on foot, through Mexico. The slow-moving “caravan” has been closely monitored by President Donald Trump, whose obsession with immigrants has gone into overdrive lately. In tweets and other public statements, Trump has evoked dramatic images of a mass invasion at the Southern border. He summoned National Guard troops to guard the border earlier this month, and he has repeatedly renewed his demand for a massive border wall. “Are you watching that mess that’s going on right now with the caravan coming up?” Trump asked the crowd during a rally in Michigan on Saturday night, claiming that San Diego is “being just overrun” by migrants. “Everybody pours through,” Trump said to the crowd.

But images of the migrant caravan belie the reality on the ground. The question of whether an invasion is actually occurring at the Southern border is, of course, an empirical one, and the federal government’s own statistics tell a much different story than the one offered by Trump. According to data from the Department of Homeland Security, illegal crossings are now at historic lows—about one-fifth of what they were at their peak in the late-1990s and early-2000s—and a large proportion of the immigration flows from Mexico that once occurred illegally now occur through legal channels.

In the six months between October 2017 and March 2018, for instance, the Border Patrol says it apprehended 177,021 unauthorized border crossers. This is about 12 percent fewer than it apprehended during the same six-month period last year. In total, the Border Patrol caught 310,531 illegal border-crossers between October 2016 and October 2017. That may sound like a big number, but the previous time apprehension figures were that low was in 1971, when the Border Patrol caught 302,517 people crossing the border.

Border Patrol apprehensions increased steadily during the 1970s and 1980s, and then skyrocketed during the 1990s when millions of people—mostly from Mexico—crossed the border illegally to fill jobs during the economic boom. Apprehensions along the southwest border peaked at 1.7 million in 2000. They’ve been declining ever since.

Apprehension data can be an imperfect measure of unauthorized border crossings. The number of apprehensions may fluctuate—not due to changes in immigration flows—but because of changes in Border Patrol resources. In theory, higher apprehension numbers could reflect greater funding, staff, and resources for the Border Patrol to pursue migrants.

But the reduction in apprehensions over the past two decades has come even as the federal government has dramatically increased resources for the Border Patrol. In 2000, 8,580 Border Patrol agents apprehended 1.7 million migrants on the Southwest border. In 2017, nearly twice as many Border Patrol agents apprehended less than a fifth as many migrants. Adjusted for inflation, the Border Patrol’s budget more than doubled between 2000 and 2017.

If the decline in apprehensions isn’t due to a contraction of Border Patrol resources, why has illegal immigration been decreasing since the early 2000s? One reason is that migrating illegally has become increasingly difficult and dangerous. The buildup of Border Patrol resources along the Southern border—particularly since the terrorist attacks on Sept. 11, 2001—has pushed migration routes into the most remote, inhospitable areas of Arizona, Texas, and New Mexico. It can take five days or more to traverse these sparsely populated areas on foot. Each year, hundreds of people die of heat stroke and dehydration while trying to make that trek.

The Great Recession also reduced the number of migrants who attempted to cross the border seeking better wages. After 2008, unemployment in the United States rose and immigrants struggled to find jobs. Since the recession, illegal immigration has stayed relatively low, thanks in part to economic growth and lower birth rates in Mexico.

A final—and often overlooked—reason for the decrease in illegal border crossings is that a lot of immigration from Mexico that once occurred illegally now occurs legally through temporary worker programs. Between 2004 and 2016 (the most recent year that data are available), the number of Mexicans entering the United States on temporary work visas increased by more than 500 percent, from 137,000 to 843,000. The increase has been especially pronounced in the agricultural sector, where the number of legal temporary workers from Mexico increased by almost 2,000 percent, from 17,000 in 2004 to 332,000 in 2016.

Trump himself seemed to endorse those increases at a rally in Michigan on Saturday night. “You know, the unemployment picture is so good, it’s so strong that we have to let people come in,” he told the crowd. “They’re going to be guest workers, they’re going to come in, they’re going to work on your farms, we’re going to have the H-2Bs come in, we’re going to have a lot of things happening, but then they have to go out. Then they have to go out. But, we’re going to let them in, ’cause you need them.”

Trump has not been as sympathetic to the rising numbers of Central Americans, who have increasingly sought refuge in the U.S. as they flee violence in their home countries. Although illegal immigration from Mexico has been decreasing, apprehensions from Central America rose by approximately 275 percent between 2011 and 2017. The uptick has been driven largely by gang violence, a prolonged drought, and political upheaval. But the populations of Guatemala, Honduras, and El Salvador combined are less than a quarter the population of Mexico, and they must endure longer journeys to the United States. Therefore apprehensions of Central Americans, although up since 2011, are currently only about a tenth of what apprehensions from Mexico were at their highest point.

And while Trump faults Mexico for “sending” criminals to the United States, the Mexican immigration authorities have, in fact, assisted in staunching the flow of immigrants. This has been particularly helpful in reducing the inflows of Central Americans at our Southwest border, which have gone down by 30 percent since peaking in 2014. Illegal immigration from Central America would likely decrease even further if more Central Americans accessed the temporary labor programs that Mexicans now use in such large numbers. In 2016, only 13,262 Central Americans entered the U.S. on temporary work visas.

Certainly, no amount of hard data showing that illegal immigration is at historic lows will persuade President Trump to give up on his promised wall or to stop mobilizing the National Guard to defend the border. But facts still matter, and the facts tell us that there is no invasion occurring at the Southern border.