On May 10, 2011, President Obama gave a speech near El Paso that turned out to be prophetic.
A border fence stretched for hundreds of miles between the United States and Mexico. The number of Border Patrol agents had doubled to 20,000 in less than a decade. Drones patrolled the skies.
But Obama warned it probably wouldn't be enough to satisfy Republican adversaries.
"You know, they said we needed to triple the Border Patrol," Obama said. "Or now they're going to say we need to quadruple the Border Patrol. Or they'll want a higher fence. Maybe they'll need a moat. Maybe they want alligators in the moat. They'll never be satisfied."
In the 2016 presidential campaign, Republican front-runner Donald Trump has based much of his candidacy on just such a promise to go further — and to build "the greatest wall you've ever seen" between the U.S. and Mexico.
"I want it to be so beautiful because maybe someday they're going to call it the Trump wall," Trump said in August. Perhaps even bolder was his demand that Mexico fund it, prompting former Mexican President Vicente Fox to say this week, "I'm not going to pay for that ... wall."
But controversies over how to guard the U.S.-Mexico border are as old as the border itself.
At the end of the Mexican-American War of the 1840s, the U.S. annexed more than 500,000 square miles of new territory and faced a formidable problem: The new border with Mexico stretched more than 1,900 rugged miles, and it lay unprotected.
In 1849, the U.S. Army decided to build a series of forts to help secure the border — not against Mexicans, but to protect Mexicans.
New treaty obligations made it the U.S. government's responsibility to fight Native American tribes launching raids from U.S. territory into Mexico.
These forts ultimately included Ft. Worth and Ft. Bliss in Texas and helped bolster American settlement in the new territories, but they did little to protect Mexicans in the 1850s.
"Clearly, the U.S. Army's expanded fort system had little effect on border security," U.S. Army historian Matt M. Matthews wrote in 2007. "Infantry was of little use in chasing down mounted raiders, while U.S. Army mounted forces were spread so thinly they, too, proved practically worthless."
After tribal raids died down, the Mexican Revolution erupted in the 1910s, and American leaders watched in fear as revolutionaries fought for control of Mexican border towns. Once again, the enormous border seemed too long to closely guard.
Hysteria grew among border American residents after officials in 1915 discovered Mexican partisans' plans calling for a race war against whites to take back the annexed American territory.
Mexican guerrillas made small raids into U.S. land across the border, and Texas Rangers and vigilantes began killing Mexicans suspected of involvement.
Then, on March 9, 1916, a band of 500 men led by Francisco "Pancho" Villa launched a raid on Columbus, N.M., leading 12,000 U.S. troops to invade Mexico in pursuit, which the U.S. secretary of war called a "defensive" expedition to protect American interests.
The incursion lasted until 1917 and failed to capture Villa, but by 1919, almost 20,000 U.S. troops remained stationed along the border, including U.S. Army aviators and 10 balloon companies.
After Villa's forces invaded Ciudad Juarez and killed several Americans across the border in El Paso, American troops again crossed the border to drive Villa away for the last time.
Top military officials called for extraordinary manpower to secure the border. In one failed request, Secretary of War Newton D. Baker asked Congress that 100,000 soldiers "be available at all times to deal with the Mexican menace."
In 1924, Congress created the U.S. Border Patrol to secure the borders, but economic policy eventually proved even tougher to master than the incursions of Mexican revolutionaries.
Illegal immigration surged after U.S. officials allowed poor Mexican workers into the U.S. during World War II to help boost the workforce under the Bracero Program.
To stop what they called "history's greatest peacetime invasion," U.S. officials launched an operation in 1954 to mass-deport immigrants back to Mexico.
But as the Border Patrol says in its official history, "many deportees simply turned around and recrossed the seriously undermanned border."
The controversial deportations and calls for tougher border patrols set the tone for decades to come, as U.S. officials tried to crack down on illegal crossings and the menace of drug trafficking.
By the end of the 20th century, areas once patrolled by U.S. soldiers now came equipped with seismic sensors to detect tunneling and night-vision scopes to spot nighttime crossings.
Today, steel fences 15 feet tall cut in some places across the border, monitored by camera towers and stadium lights. The border at San Diego has triple fencing topped with razor wire, and a barrier stretches 300 feet into the Pacific Ocean.
But at a border visit to Laredo, Texas, in July, Trump echoed complaints that officials had made about the border for years: It still isn't secure enough.
A wall, Trump told his listeners, "will save you a tremendous amount of money."