A long row of double-stacked shipping contrainers provide a new wall between the United States and Mexico in the remote section area of San Rafael Valley, Arizona, on December 8, 2022.
CNN  — 

Arizona agreed to remove shipping containers placed as a makeshift wall along its shared border with Mexico as part of an ongoing lawsuit, according to a Wednesday court filing.

In August, Arizona Gov. Doug Ducey – a Republican and critic the Biden administration’s border policies – issued an executive order telling the state Department of Emergency and Military Affairs to use shipping containers to fill in gaps along the border, and did so without official permits or authorization, CNN previously reported.

“Arizona has had enough,” he said at the time. “We can’t wait any longer.”

The 8,800-pound, 9-by-40-feet containers stand about 22 feet tall when stacked, welded together and topped with four feet of razor wire, the governor’s office said, while border fencing built during the Trump administration is about 30 feet high.

The federal government has been battling with the state ever since to get the containers removed.

A view of shipping containers from the border wall on the frontier with Mexico in Cochise County, Arizona on November 6, 2022.

Earlier this month, the Biden administration sued Arizona for placing shipping containers at the border.

Since then, the federal government and Arizona reached an agreement to dismantle the containers, according to the latest filing.

“By January 4, 2023, to the extent feasible and so as not to cause damage to United States’ lands, properties, and natural resources, Arizona will remove all previously installed shipping containers and associated equipment, materials, vehicles, and other objects from the United States’ properties in the U.S. Border Patrol Yuma Sector, including from lands over which the U.S. Bureau of Reclamation holds an easement on the Cocopah Indian Tribe’s West Reservation,” the filing says.

“For more than a year, the federal government has been touting their effort to resume construction of a permanent border barrier,” Ducey spokesperson CJ Karamargin said in a statement Thursday.

“Finally, after the situation on our border has turned into a full blown crisis, they’ve decided to act. Better late than never. We’re working with the federal government to ensure they can begin construction of this barrier with the urgency this problem demands.”

Homeland Security Secretary Alejandro Mayorkas this summer authorized US Customs and Border Protection to close four gaps in the border wall in the Yuma sector.

Shortly after the makeshift wall project began, two shipping containers toppled. A Univision reporter who shared photos of the fallen containers said contractors in the area had told her strong winds were to blame. Ducey’s office said they suspected foul play. Since then, no similar incidents have been reported, Karamargin said.

CNN’s Catherine E. Shoichet contributed to this report.