A crew of U.S. Border Patrol agents, sweating under a hot Texas sun, squared off against an array of formidable-looking frontier fences.
They swung axes at posts, used blowtorches to melt steel, tore through sheet metal with crow bars and scaled walls with ladders.
Government engineers working with the agents rammed remote-control SUVs loaded with 10,000 pounds of sand into the barricades at 40 mph.
The agents drew on secrets learned from smugglers. The engineers had decades of expertise designing defenses for nuclear stockpiles.
Together, in a nine-week project called Fence Lab, they were trying to solve one of the nation's most vexing problems -- how to find fencing strong enough to protect the U.S. from one of the largest human migrations in history but sensitive to the fact that Mexico and the U.S. are friendly nations.
Consider the government's requirements.
The fence must be formidable but not lethal; visually imposing but not ugly; durable but environmentally friendly; and economically built but not flimsy.
"It's not that simple," said Collin Sloan, whose company was among those submitting designs to Fence Lab. Sloan has studied guard towers, machine guns and razor wire at border defenses around the world.
"Other countries are a lot more into intimidation," he said. "This is the only humane border fence being constructed."
The largest fence expansion in the history of the southwest border is well underway, with more than 70 miles erected this year and 225 planned for 2008. Often lost amid the debate over how to control the border is the thought process behind the physical barriers themselves.
Different terrains and surroundings call for different approaches, and a patchwork of about a dozen fence styles has been built along the border's length over the years.
Even the newest fencing comes in all shapes and sizes.
In the shadow of the Huachuca Mountains in Naco, Ariz., a double-layer steel mesh barricade stretches across the frontier like a sheet of honeycomb netting. Alongside small towns in California and Arizona, tall steel tubes form what look like giant picket fences. Outside Yuma, Ariz., a wall of steel plates burns hot as a skillet in the desert heat.
Fence design is constantly evolving. The mesas and canyons along the San Diego-Tijuana border form a sort of museum of the successes and failures.
In the early 1990s, agents lined 14 miles of frontier with quarter-inch-thick carbon steel panels originally used as aircraft landing mats during the Vietnam War. As landing mats, they lay flat. As fencing, they formed a vertical wall with ridged sides exposed, in effect creating a ladder for immigrants to climb.
When agents decided to make the fence taller and added angled metal screens onto the plates, they learned another lesson. They thought the screens would make climbing more difficult. Instead migrants hooked custom-made rebar ladders to the tops and began streaming over.
None of the new generation barriers have angled parts or horizontal slats. Most of the newer fencing is transparent because border agents complained that the solid steel mats blocked their view of smugglers staging crossings in Mexico.
The Department of Homeland Security began the search for new fences earlier this year, inviting private contractors to submit ideas.
Proposals had to meet certain specifications. The barrier had to be 15 to 18 feet high. It had to be able to withstand the impact of a vehicle moving at 40 mph. It had to be strong enough to keep smugglers from cutting through it in less than 15 minutes. It had to be "aesthetically pleasing" and able to be erected at a pace of at least one mile per day.
Sloan Security Fencing, Collin Sloan's family-owned company in Idaho, submitted a double-layered, steel-mesh design influenced by fences around railroad lines and government buildings in Europe.
Another design was inspired by an Israeli border fence of cables and concrete. Michael Jackson, then Homeland Security deputy secretary, used a napkin for a sketch of a concrete vehicle barrier that became known as the Michael Jackson fence.
In all, the government tested nine barriers at Fence Lab, held at the Texas Transportation Institute at College Station.
Tight security -- no cellphones, no cameras, no private contractors as witnesses -- aimed to ensure that information about construction methods and raw materials would not be leaked to smuggling organizations.
The dozen or so Border Patrol agents on hand came from the fence crews that roam the border to patch, weld and make other repairs to torn-up barriers. The engineers from Sandia National Laboratories, a Department of Energy research and development lab with Cold War-era roots, called the agents "the red team."
"They came in as the opposing team, the adversaries," said Brian Damkroger, who oversees border security work for Sandia. "The team had a number of procedures and tool kits that they had developed and seen utilized in certain areas of the border, and they went through a systematic series of tests designed to judge the vulnerabilities of the fences."
In other words, the red team attacked -- with battery-powered saws, grinders, fire axes and ladders taken from Tijuana human smugglers. One by one, in a matter of minutes, they reduced the fences to tatters. The engineers hadn't expected that.
"I think they were impressed by the inventiveness, and I know we opened their eyes," said Chris Wells, the Border Patrol's assistant chief from California's El Centro sector. "We exposed them to a world that is normal to us but is unusual to them."
The results did not mean the designs were scrapped. At least one fence similar to a tested one has since been erected. The goal, experts say, isn't to find a barrier that can't be breached.
"There's nothing that's impenetrable, no material that can't be cut given certain time frames," said Rowdy Adams, a Border Patrol chief.
The idea is to develop fences that slow down illegal crossers, agents say, allowing time to stop migrants before they disappear into border communities, known as the melt zone. At Fence Lab, the designs deemed most promising took the longest to conquer.
Innovations have often come out of Fence Lab and similar testing projects.
Hollow steel tubing, once easily cut by blowtorch-wielding smugglers, is now filled with concrete. Immigrants still get through it, but it takes time because they have to use slower-cutting saws. Rectangular posts have given way to harder-to-climb rounded ones. Fencing has grown taller.
In urban areas where the melt zone is just a quick dash from the border, layers of barriers are erected to make that dash much harder.
In San Luis, Ariz., migrants who scale the landing-mat fence now find themselves blocked by a newly installed secondary barrier made of steel mesh. The mesh is a favored material because of its tight cross-hatch pattern, which makes it difficult to find a toehold for climbing. It was recently put up along 32 miles east of San Luis, the longest stretch of continuous fencing on the border.
In rainy areas, however, mesh and solid-steel fencing won't do because they impede water flow and can cause flooding. That's why in places like the monsoon-drenched Altar Valley south of Tucson, the government is placing tall steel tubes four inches apart, gaps too small for people but big enough so that water can flow freely.
Then there's the highly subjective question of aesthetics. In the past, people found the steel-mat fencing such an eyesore that they painted it beige or covered it in murals. The federal government, sensitive to complaints from Mexico, doesn't want new fencing to look like a wall.
"They want to make it seem like you could shake hands through the fence," said Peter Andreas, a political science professor at Brown University who studies border security issues.
Whether the new fencing meets aesthetic standards remains an open question. Except for a five-mile stretch of steel-plate barriers outside San Luis, most of the new fencing is made of mesh or steel tubing.
The new structures are taller and more imposing than the landing-mat fencing. But then much of the new fencing has gone up in rural areas.
"There are very few people that can see the new fence, which may be why we're not getting reports of people not liking it," said Jeremy Schappell, a Border Patrol agent who works in the San Luis area.
One of the Fence Lab barriers that agents seem to like best so far is a double-mesh barrier made of thick welded wires in a tight honeycomb-like design. The tiny holes between the wires make climbing difficult. Axes and crow bars are useless because the layers give under pressure. Blow torches get through, but it takes more than 15 noisy minutes to cut both layers.
Still, this summer a similarly constructed double-mesh fence went up along seven miles of border in Naco, Ariz., and within days Mexican smugglers had found a way to defeat it. By inserting screwdrivers into the holes to use as handholds, they are able to scale the fence as if it's a pegboard.
"They get over in about 15 seconds," said John Ladd, 52, whose 14,000-acre ranch abutting the border is trampled daily by migrants.
Even so, Border Patrol agents see progress.
After all, said Agent Sean King, based in Tucson, only the most athletic migrants possess the strength to pull themselves over with screwdrivers, and they can't do it en masse.
"Now, it's one immigrant coming over at a time instead of 100."