The following editorial appeared Thursday in the St. Louis Post-Dispatch.

Since 1997, key players in the nation's defense establishment have been trying to build a network of high-tech gadgets along America's borders that would help track and capture people coming into the United States illegally.

From Washington, it looks simple: Use technology to build a "virtual fence" along 6,000 miles of the Mexican and Canadian borders. It ought to be cheaper and far less intrusive than actual walls and fences.

Plus it would keep defense dollars (disguised as Department of Homeland Security dollars) flowing to defense contractors.

In 1998 came the "Integrated Surveillance Intelligence System," which had problems with mismanagement and equipment that didn't work.

ISIS was absorbed by the "America's Shield Initiative" in 2005, which was plagued by mismanagement and equipment that didn't work.

So, in 2006, President George W. Bush signed a law creating the "Secure Border Initiative." As envisioned, the "SBInet" virtual fence (supplemented by some real fences) along the borders would cost $2.5 billion and be completed in three years.

By last week, the estimated cost of finishing the project had ballooned to $30 billion. In the wake of yet another critical report by the Government Accountability Office, the feds pulled the plug on the program.

This move had been expected since April, when the Homeland Security Department stopped spending money on a 53-mile demonstration project south of Tucson. Twenty-eight miles of it were secured with towers bristling with monitors and transmitters designed to pick up signals from sensors, cameras and radars and to transmit information to Border Patrol vehicles.

The idea was that the gadgets would enable fewer human beings to patrol longer stretches of the border.

But it turns out that integrating all that technology, particularly in rugged remote terrain, is a lot harder than it looked. People along the border complained about privacy invasion. Cows set off signals. Equipment wouldn't talk to other equipment.

The job of making SBInet work belonged to the prime contractor, Boeing's Defense, Space & Security unit, headquartered in St. Louis. Boeing would supply some of the electronic gadgetry and monitor the subcontractors who would and do the actual work.

This didn't pan out, either.

Taxpayers paid $429 million for the ISIS and America's Shield initiatives and about $850 million on the SBInet virtual fence. Another $3.2 billion has been spent for 670 miles of regular fences or vehicle barriers; some 1,300 miles remain unfenced.

And the United States still doesn't have a comprehensive immigration policy, which would eliminate the need for a lot of this.

What it does have, however, is the Raytheon Corp., which earlier this month said its new "Clear View" surveillance system could succeed where SBInet, America's Shield and ISIS had failed.

Like illegal immigrants, defense contractors are hard to stop.