In the first post‐​election immigration action taken by any branch of government, the House of Representatives voted on Lamar Smith’s STEM Jobs Act (H.R. 6429) several weeks ago. STEM would have ended the diversity lottery and allocated all of those green cards to highly skilled immigrants, a positive move.

A curious political consensus emerged after the elections as both parties want to pursue immigration reform. Aside from STEM, legalization of current unauthorized immigrants and increased enforcement have received the most attention. But any viable reform must include increasing legal immigration, and not just for highly skilled workers.

Enhanced enforcement and legalization were cornerstones of the 1986 Reagan amnesty. Lawful immigration was not expanded then and only barely nudged upward by the Immigration Act of 1990. Unauthorized immigration numbers shot up because the labor market still demanded workers after the Reagan amnesty.

Reagan’s amnesty failed because it did not increase legal immigration or create a viable guest worker program. Failing to provide a legal immigration pathway to peaceful and healthy immigrants of all skill levels soon erased the gains of Reagan’s amnesty. After Reagan’s amnesty, enforcement increased along with a seemingly intractable unauthorized immigration problem.

This is in stark contrast to the situation under America’s traditional immigration policies.

From 1790 to 1921, with the exception of the shameful Chinese Exclusion Act in 1882, the U.S. had mostly free immigration. Ships from Europe bearing Italians, Jews, Russians and Poles did not sail up to American beaches and disgorge their human cargo in the hope that they would evade a Border Patrol (which, incidentally, did not exist until 1924). An immigrant getting off the boat was allowed to enter upon passing health and criminal inspections.

Immigrants landed legally in East and West Coast ports and processing centers like Ellis Island because there was an easy legal process that would allow the majority of them to enter. Unauthorized immigration was rare at that time.

That ended with the Progressive Era’s emphasis on protecting labor unions and the eugenics movement. New quotas limited immigration to North and Western Europe, making legal immigration for the vast majority of aspiring immigrants impossible.

Influenced by the material poverty and crank economic theories produced by the Great Depression, President Herbert Hoover reduced the number of immigrant visas by about 90 percent to “protect American workingmen from further competition for positions by new aliens.” FDR continued Hoover’s policy and also deported more than a million people of Mexican descent, 60 percent of them American citizens.

High unemployment ended with the U.S. entering World War II, as millions of men were drafted and others worked in war industries. Scarcity of workers replaced high unemployment, hurting labor‐​intensive sectors like agriculture.

The Bracero Program, a temporary guest worker program for farm laborers from Mexico, was implemented in 1942 to relieve this scarcity. The program ended in 1964 under pressure from labor unions led by César Chávez and activist bureaucrats. Once again, for the vast majority of poor people who wanted to come to the U.S., the only entry was unlawful.

The Bracero Program was the most effective guest worker visa in the history of government‐​managed migration. It combined vigorous enforcement that was designed to funnel migrants into the legal system with a numerically unlimited number of visas that adjusted according to economic demands in one sector of the economy.

During the Bracero Program, Border Patrol drove unauthorized immigrants down to the U.S. border and immediately let them enroll in the program and return to their jobs, after literally taking a single step over the border and coming back into the U.S. with lawful permission.

Mexicans thinking of entering the U.S. unlawfully quickly learned that they only had to apply and they would get temporary guest worker status. They flocked to the legal option. If there was a legal option today, expanded to sectors of the economy besides just agriculture, immigrants would overwhelmingly make the same choice.

Charles Krauthammer, conservative commentator, proposed that the government should “promise amnesty right up front. Secure the border with guaranteed legalization to follow on the day the four border‐​state governors affirm that illegal immigration has slowed to a trickle.”

But securing the border can happen only if there is a viable way for most aspiring immigrants to enter the country legally in a timely manner. Immigration enforcement should act as a funnel guiding immigrants toward a viable lawful migration path, not just as a bludgeon to remove otherwise law‐​abiding people.

Without greatly increasing lawful immigration, or at the minimum, a large and flexible guest worker program, any immigration reform plan will either not address the main problem or repeat the Reagan amnesty, setting the stage for more unauthorized immigration in the future.