The new Congress has come ready with some fresh ideas for immigration reform. Freshman Republican Sen. Cory Gardner, R‑Colo., said in a recent interview, “We have to start with a secure border, we have to start with a guest worker program.” Gardner is right to link border security with a guest worker visa program. The former cannot be achieved without the latter.

Gardner’s comments are an under appreciated bit of common sense in an immigration debate stubbornly stuck between the polar opposite demands for nearly unlimited border security from the populist Right and unconditional amnesty from the progressive Left. Neither position will stop illegal immigration.

Doubling down on enforcement by itself won’t work. Since 1992, there has been an almost 500 percent increase in the number of Border Patrol agents and patrol hours spent along the Southwest border. In 2014, apprehensions — a proxy measure of the number of illegal crossers — were little more than a fourth of their 2000 peak of 1.6 million. Last year’s apprehensions were almost 100,000 fewer than they were forty years ago in 1974.

Texas Republican Rep. Mike McCaul’s new Secure Our Borders First Act would amass dubious technologies at the border — fences and other security gimmicks that will have little impact on an already trivial flow of unlawful immigrants. Instead of beefing up security, a guest worker visa program could decrease illegal immigration even further. History provides a prime example.

In 1953, there were about 2 million illegal immigrants from Mexico in the United States. By 1955, the number had fallen 90 percent and the cross-border flow nearly ceased — all while the number of Border Patrol agents actually dropped. This turnaround was achieved by the expansion of the so-called “Bracero” guest worker visa program.

After the expansion, Mexican workers learned that they could get a work visa easily. The visa allowed American farmers to legally hire migrant workers with minimum government oversight. Border Patrol helped by handing illegal immigrants a Bracero visa at their worksites. Many times, Border Patrol even brought the workers to the border so they could take one step into Mexico and immediately into the U.S. legally — a process dubbed “walking around the statute.”

Once Mexican migrants realized it was simple and cheap to get a visa and American farmers realized they could hire all of the legal migrant workers they demanded, the illegal immigrant market virtually disappeared. At this point, Border Patrol and immigration enforcement focused on those few illegal immigrants that remained — a job made much easier, because Bracero shrunk their numbers so dramatically.

Bracero was ended in 1965, due primarily to opposition from labor unions. As a result, the number of illegal immigrants shot up after that year. This deprived American businesses of a legal way to hire migrants, and migrants of a safe and legal way to enter, ushering in the modern age of illegal immigration.

Enforcement is vital but it is merely an expensive band aid without a functional guest worker visa program. The government can’t get a handle on illegal immigration without a guest worker visa program to legalize much of the flow. A large and lightly regulated guest worker visa will drive would-be illegal immigrants into the legal system — an option that currently does not exist for them.

Amnesty has similarly failed to control illegal immigration — even when combined with more border security. The 1986 Ronald Reagan amnesty did both in spades but did not create a guest-worker visa. The number of illegal immigrants shot up after Reagan’s amnesty because the labor market demanded more workers but there was no legal way for them to come.

Bracero wasn’t a perfect guest worker visa, but its example shows how the opportunity for legal migration can crush illegal immigration. Gardner was right to link border security with a guest worker visa program. In practice, a functional guest worker visa makes border security possible. It’s high time Congress recognizes that.