Giving in to Republican pressure, President Obama ordered 1,200 National Guard troops to Arizona this week and is seeking an additional $500 million for border security. Yet for all these big numbers, troops on the border, walls, and harsh laws like Arizona’s SB 1070 will not deter illegal immigration. Only legalization and expanding options for legal immigration can do that.

Only sound legislation—amending the immigration laws to fit reality—will take a permanent bite out of illegal immigration. The last immigration bill proposed in Washington, the Comprehensive Immigration Reform for America’s Security and Prosperity Act of 2009 (CIR ASAP), ignited a passionate debate on Capitol Hill over legalizing non-criminal aliens. But legalization is only half the battle: Expanding legal immigration options is what is needed.

According to the Pew Research Center, there were 10.8 million illegal immigrants in the U.S. in 2009. Illegal immigration is a relatively recent phenomenon in the nation’s history. Prior to the 1920s, with some notable exceptions, the U.S. was a free immigration country. The 1921 Emergency Quota Act changed all that. It might as well have been called the “Illegal Immigration Creation Act of 1921.”

Immigration policies caused illegal immigration by severely restricting and, in many cases, entirely removing the possibility of legal immigration. Legislation will not stop ambitious foreigners from seeking a better life in the United States. Who can blame them—this is a great country! All restrictive laws do is to push the problem into the black market, into the hands of unscrupulous actors. Is that the anti-immigration lobby’s goal?

The solution is some sort of comprehensive legalization of non-violent illegal immigrants and expanding the legal flow of future immigrants. Past legalizations, like the 1986 amnesty, worked to solve half the problem but failed to stem the flow of illegal immigrants in the long run, because legal immigration options were not expanded enough.

Since then, efforts at real immigration reform that takes account of economic reality have been torpedoed at every opportunity by populist rhetoric; CIR ASAP is the latest result. It doesn’t offer a successful legalization strategy because expanding legal immigration is still anathema to a majority of politicians.

Most temporary work visas are sponsored by employers. They must follow a complicated and costly regulatory process to hire foreigners temporarily to fulfill needed jobs. H-1B visas, for highly skilled workers, can cost thousands of dollars per worker. For hiring lower skilled workers through the H-2 visa program, the cost is so high that the program is practically never used.

It is not surprising then that, denied the possibility of sponsoring foreign workers legally, employers turn to hiring undocumented workers. Illegal immigration will not come under control until work visas and immigration rules are reformed to accommodate that reality. Four steps are needed:

1. Individual workers, not employers, should hold the visas.

2. Hiring a visa holder should be as easy as hiring an American citizen or permanent resident for the same job.

3. There should be no numerical cap on the number of immigrants.

4. Instead of trying to arrest busboys, fruit pickers, and software engineers U.S. immigration enforcement should focus on weeding out criminals, potential terrorists, and those with terrible diseases.

Amassing troops on the Mexican border may make politicians and some voters feel good, but it is no solution to the problem. Violence in Mexico is a real and growing concern but it has yet to spill over into America in any meaningful way. Ciudad Juarez, the most violent city in Mexico, suffered 2,500 murders in a recent 18-month period, compared with 18 murders across the border in El Paso during the same period. In fact, more El Pasoans were murdered in Juarez than in El Paso.

The oft quoted (but never cited) fact that Phoenix is fast becoming the kidnapping capital of the world is due to drug violence, not illegal immigration. They are different issues. Enforcing immigration laws will not cut down on violence in Phoenix.

Millions of immigrants will come to the U.S. in the coming decades. It is not a matter of government policy, but of economic reality. People will move seeking economic opportunities. Employers will hire whoever they can to do the work they need done. The U.S. needs a legalization bill that eases and expands legal immigration to millions of non-criminal foreigners. Putting National Guard troops in harm’s way when tensions with North Korea and Iran are flaring is a distraction.

Legalization eliminates black markets and their attendant negative consequences, and will free up much needed security resources and troops for security enhancing missions. It’s about time that our government gets serious about real immigration reform.

Alex Nowrasteh is an policy analyst at the Competitive Enterprise Institute.

Fox Forum is on Twitter. Follow us @fxnopinion.