Arizona has agreed to dismantle the makeshift shipping container border wall along the state's border with Mexico as part of an ongoing lawsuit. This new development was announced months after Republican Governor Doug Ducey said that Arizona was "not backing down" on the issue.

Court documents filed at the U.S. District Court in Phoenix on Wednesday revealed that Ducey had reached an agreement with President Joe Biden's administration to stop the installation of the shipping containers along the Mexican border.

The agreement noted that Arizona must dismantle the finished portions of the makeshift border wall by January 4 without damaging natural resources.

The shipping containers installed as makeshift border walls cost at least $80 million. More than 900 cargo containers cover portions of the state's 370-mile Mexican border.

Arizona officials will have to consult with U.S. Forest Service representatives throughout the removal process as part of the new agreement, according to the court filing.

In August, Ducey signed an executive order directing the state's Department of Emergency and Military Affairs to use shipping containers to fill in gaps along the border. Since then, the federal government has been battling with the state to get the shipping containers removed.

In October, the state filed a lawsuit against the federal government for the right to keep the border wall. Ducey, who ordered the construction, said Arizona will do the job that Joe Biden "refuses to do." The Biden administration sued the state earlier this month for placing shipping containers at the border.

READ NEXT: Texas: Greg Abbott Gets Brutally Honest on Scary Effects of Title 42 Abolishment

Arizona Makeshift Border Wall

According to the governor's office, the shipping containers stand about 22 feet tall when stacked and topped with four feet of razor wire.

Ducey's spokesperson CJ Karamargin said in a statement that the federal government has been pushing efforts to resume the construction of a permanent border barrier for more than a year.

Karamargin noted that the state government is working with the federal government to ensure they can start the construction of this barrier.

Homeland Security Secretary Alejandro Mayorkas allowed the U.S. Customs and Border Protection to close four gaps in the border wall in the Yuma sector. Two shipping containers toppled shortly after the makeshift border wall project started.

Contractors said one of the fallen containers was caused by strong winds. According to Karamargin, Ducey's office suspected foul play, and no similar incidents have been reported since then.

Arizona Dismantling the Shipping Containers

It is still being determined when crews will start removing the shipping container border wall or how much it would cost the removal of the 9,000-pound boxes and repair the environmental damage after bulldozers cut roads.

In a statement, Russ McSpadden, the southwest conservation advocate for the Center for Biological Diversity, said Ducey has wasted countless millions of taxpayer dollars by installing the "illegal shipping container wall."

McSpadden added that they were very pleased to see Ducey agree to "remove his political stunt." Ducey's shipping container wall came as an influx of illegal migrants attempted to cross the southern border into the United States.

The Biden administration sued Ducey and Arizona, arguing that the wall trespassed on federal lands. The Center for Biological Diversity also filed two lawsuits against the shipping container wall.

The group argued that it divided a conservation area where vulnerable species live. The group noted that the makeshift wall also blocked access to waterways and disrupted the natural landscape.

READ MORE: Texas, Arizona Keep Sending Buses of Migrants to Washington; DC Mayor Devotes $10 Million to Help

This article is owned by Latin Post.

Written by: Mary Webber

WATCH: Arizona to Remove Shipping Container Border Wall - From CBS News