A wall of shipping containers installed just a few months ago by the then-governor of Arizona at a $100 million cost to US taxpayers was being dismantled Friday.

Republican Doug Ducey ordered the huge line of shipping containers to be placed at the frontier between the United States and Mexico, during the final months of his administration, in what he said was a bid to stem illegal immigration.

But after being sued by Washington for putting the containers on federal land in the Coronado National Forest, Ducey -- who has since been succeeded by Democrat Katie Hobbs -- agreed in December to remove them.

"I couldn't believe that Governor Ducey thought that it was a good idea," said Debbie McGuire, as a truck barreled down a dusty road carrying an empty container away.

"It's absolutely ludicrous. To put containers that weren't going to work ever to keep anybody out," added McGuire, who until recently owned a home in nearby Tucson.

"I just can't believe he thought it was a good idea. Ridiculous, and a total waste of taxpayer money."

Ducey's container wall effort began in the middle of 2022, and quickly ran into opposition, with critics slamming it as a cynical political move that would damage the environment and make no difference to the number of illegal border crossings.

Opponents said the corrugated containers, which snaked like a huge cargo train for four miles (seven kilometers) through federal lands, divided an important conservation area.

They also pointed out that the terrain is so difficult to traverse that people traffickers have never really used it.

In practice, the double-stacked containers were ill-suited to keeping people out -- their rigid shape means they didn't always line up, leaving gaping holes between boxes easily big enough for a person to fit through.

In some areas, the terrain was too steep to accommodate them, and workmen had to leave spaces.

"It's just political gamesmanship," said Bill Wilson from nearby Sierra Vista, as he watched the wall being dismantled on Friday.

"It's a travesty and a waste of government money, tax money, time and effort," the 77-year-old told AFP.

Arizona shares around 370 miles (600 kilometers) of border with Mexico, including environmental preservation areas, national parks, military zones, and indigenous reservations.

Until the 2017 arrival in the White House of Donald Trump -- who was propelled to power on his pledge to "Build That Wall" -- there was very little in the way of a physical barrier separating it from Mexico.

Now vast stretches of the border have a fence that towers up to 30 feet (nine meters) high.

Before the containers arrived in the Coronado National Forest -- an area that can only be reached by dirt roads -- the border here was demarcated by a wire fence.