Here’s the paradox of immigration in America right now: The economy is roaring, and wages are rising, yet 2017 was another year of virtually no illegal border crossings. On average, each Border Patrol agent apprehended just 16 people all year — one every three weeks, tied for the lowest rate since World War II. This is down from when Border Patrol agents apprehended an average of 261 crossers per agent in 1996.

Where have the illegal crossers gone? Newly released statistics from the Department of State give a plausible answer: They haven’t disappeared; they’ve become legal.

The 16 apprehensions per agent in the entire year was significantly fewer than the 21 apprehensions that each agent was making in a month throughout the 1990s. This figure actually overstates the agency’s current workload because so many of today’s “apprehensions” are, in fact, asylum seekers, families and unaccompanied children who turn themselves in to the agents.

Of course, many factors affect the number of border crossers. Changes in Mexico’s economy, border security and demographics all played a role in the steady reduction in illegal immigration. But one factor deserves far more attention than it has received so far: Legal entries are becoming the norm.

From 1996 to 2017, the number of temporary visas issued to seasonal workers on farms and other industries increased tenfold, from 23,204 to 236,695. Even while Congress has done little on other immigration issues, seasonal worker programs have gradually expanded.

Entries using these visas have increased twice as fast as the number of legal documents issued themselves, meaning that each worker is crossing back and forth legally in a way that was much less common in 1996. This is partly because an increasing share of the visas are going to Mexican workers who can easily criss-cross the border. In 1996, Mexicans made just 60 percent of all border crossing entries. In 2016, that figure was 90 percent.

While Border Patrol has tripled its manpower and constructed a system of more than 600 miles of fences and barriers during this period, increased security is not the primary explanation for the reduction in illegal immigration. We know this because it hasn’t actually worked very well. According to the Department of Homeland Security, the agency caught only half of the people who actually attempted to evade entry in 2014 and 2015 (i.e., not the asylum seekers or children). The best estimate by Princeton University’s Douglas Massey finds that in the 1990s, 95 percent or more border crossers eventually made it across after multiple attempts. All of the increased enforcement decreased the success rate only to 75 percent. In other words, now that the economy has rebounded, many more people ought to be attempting to sneak into the country.

Instead, potential undocumented border crossers have found their way into the legal system. As the number entering legally has increased, the Border Patrol’s job has become much easier. They have effectively gained control over the border for the first time since the early 1960s, and it is in an important way thanks to these guest worker programs.

America has two guest worker programs for seasonal laborers, the H‑2A for agriculture and the H‑2B for other industries, both created in 1986. Although the H‑2B program has a quota, employers rarely reached it during the 1990s, and several times since then Congress has temporarily increased the limit. The H‑2A program has no cap, which has allowed for a steady expansion over two decades.

In the early 2000s, H‑2Bs were 70 percent of the flow, but the H‑2A is now almost two-thirds. Farms have found creative ways to reduce the costs and risks of the program. The North Carolina Growers Association has pioneered a model whereby the association sponsors the workers on behalf of the individual farms, allowing businesses in the association to share the workers and share the costs.

While anti-immigrant groups on the right and union-founded groups on the left have fought the H‑2 trends, a coalition of moderate Democrats and Republicans has defended the programs, citing solid evidence that they don’t displace U.S. workers and do increase economic growth. President Trump’s businesses use both programs, and he defended the practice in a GOP primary debate in 2016.

The trends paint a compelling picture of what would happen if the administration does limit the flow: a lot more illegal immigration.