By day, Peruvian police and soldiers search for and destroy equipment used by illegal gold miners in a part of the Amazon rainforest where mining has transformed once-dense foliage into a desert pocked with dead trees and toxic pools. As night falls, they play cards and soccer, call family from their remote outpost or have a medic pluck burrowing parasites from their feet.

For a decade, a gold rush accelerated in Peru's Tambopata province, a center for an illicit activity that is among the most lucrative, and destructive, in the Amazonian wilderness. Security forces came and went; miners scattered and returned. Then Peru announced something different: It installed long-term military bases in hopes of curbing not just illegal mining but also human trafficking and other associated crimes.

"Operation Mercury" began in February when authorities evicted thousands of illegal gold miners from the area and deployed hundreds of police and soldiers for the long term, lodging them in some cases in the same makeshift quarters once used by gold dealers. The men in uniform regularly patrol in vehicles and on motorcycles, though some miners emerge at night and there are concerns that others will wait for the military presence to subside, or simply relocate to more remote areas.

"As many miners tell me, these interventions just push miners into areas further and further into the rainforest, because they want to prevent being caught," said Jimena Diaz Leiva, a PhD student at the University of California, Berkeley who has studied the illegal industry.

She also said the small-scale miners feel ignored and vilified by a government that they say has shown little interest in their economic wellbeing and whose initiatives to bring them into the legal mining industry have not been effective.

What is certain is the devastation left behind — partly because of the mercury used to separate gold from debris during excavation. Tens of thousands of acres (hectares) of rainforest have been destroyed.

"The damage to nature here is so terrible that all the water is poisoned," said Maj. Gustavo Cerdeña, head of a police unit.

Cerdeña said he had come to the area before the law enforcement operation began in February, posing as a gold buyer in order to gather intelligence on the criminal syndicate dominating the illegal trade.

"It was full of people. It was like Gomorrah before it rained fire," he said, referring to the biblical city's destruction. "Now everything is quieter."

The area known as "La Pampa," which surrounds a national park and doesn't appear on state maps, has yielded roughly 25 tons of illegally mined gold a year, much more than the output of Yanacocha, Peru's most productive legal gold mine, according to the Peruvian government. Peru is the No. 1 producer of gold in Latin America.

It is a pattern being repeated to varying degrees elsewhere in the Amazon, including in Venezuela, Bolivia, Ecuador, Colombia and Brazil.

Fueled by rising global prices for gold, illegal mining destroyed 92,000 square miles (238,000 square kilometers) of forest between 2000 and 2015, according to the Amazonian Network of GeoReferenced Socio-Environmental Information, a coalition of non-government groups that analyzed data from the Amazon in nine countries. The use of hundreds of tons of toxic mercury in illegal mining across the continent has raised concerns about health problems on affected land, some of which is occupied by indigenous people.

The military bases in La Pampa will remain at least through mid-2021, when the term of the current government ends.

One base occupied by security forces is surrounded by two lakes contaminated with mercury as well as debris left by miners. There are abandoned shops, and a small memorial site for a dead miner, marked with artificial flowers and bottles of alcohol. A few dogs and cats wander around the bleak landscape.

The police and soldiers occasionally find machinery used by the illegal miners, and blow it up with dynamite. They also destroy metal tubing used to mine gold.

Ernesto Ráez, a biology professor in the Peruvian capital of Lima, said it would take generations to restore and reforest areas affected by mining.

"It will take more than a lifetime to see a forest comparable to the one that was destroyed," he said. "But it's worth it."

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.