The withdrawing U.S. military is destroying most of the equipment it is leaving behind in Afghanistan after 13 years of war, selling the scrap for millions of dollars to those willing to buy it.

The policy stands in stark contrast to the Americans’ withdrawal from Iraq, when they donated or sold still-usable items worth about $100 million.

The equipment is being trashed, U.S. officials say, because of fears that anything left behind in Afghanistan could fall into the hands of insurgents and used to make bombs. Leaving it behind also saves the U.S. billions of dollars in transportation costs.

Afghans are angry at the policy, arguing that even furniture and appliances that could improve their lives is being turned into useless junk.

“They use everything while they are here, and then they give it to us after breaking it,” said Mohammed Qasim, a junk dealer in the volatile southern province of Kandahar. He gestured toward the large yellow frame of a gutted generator, saying it would have been more useful in somebody’s home, given the lack of electricity in the area.

The twisted mounds of metal, steel and industrial rubber scattered over a vast field had once been armored vehicles, trucks and huge blast walls that protected troops from suicide bombers. Giant black treads were pulled from tanks. Even air conditioners, exercise machines and office equipment were crushed and stuffed into multicolored shipping containers piled on top of each other in the junkyard.

In the past year, the U.S. has turned equipment and vehicles into 387 million pounds of scrap that it sold to Afghans for $46.5 million, according to Mimi Schirmacher, a spokeswoman for the military’s Defense Logistics Agency in Virginia.

The scrapped material was too worn out to repair or not worth the expense of carrying it back to the U.S., officials said.

Not everything in Afghanistan was destroyed. Coalition forces have handed over $71 million in equipment intact to the Afghans, said Col. Jane Crichton, a public affairs officer for U.S. forces in Afghanistan. She said $64 million of that came from the U.S.

“We work closely with the Afghan National Security Forces to determine what equipment they need, if it is in good condition, and ensure they are capable of maintaining it,” Crichton said in an email.

Spokesmen for President Hamid Karzai said the government has “repeatedly” asked U.S. officials to neither destroy nor remove its military equipment from Afghanistan when its combat troops leave.

“We oppose the destruction of any of the equipment and hardware that can be of use by the Afghan security forces,” deputy presidential spokesman Fayeq Wahedi said in an email.

The military faced a similar logistics dilemma when it pulled out of Iraq in 2011, but it left most of the equipment with the government, including water tanks, generators, furniture and armored vehicles. Nearly $100 million in equipment was donated or sold to the Iraqis as of 2010, military officials said at the time.

Crichton said the Iraqis were better prepared to receive and maintain the equipment.

“Iraq had a higher number of military and police personnel, and they had a more developed infrastructure at the end of operations to support the equipment,” she said.

The lessons learned from Iraq included how to save money by dismantling, relocating and disposing of equipment it didn’t want to ship home, she said, as well as earning money by selling it as scrap to the locals. The U.S. deployed an estimated $33 billion in equipment to Afghanistan.