(CNN) -- It's harvest time in the heart of Brazil. Top-of-the-line John Deere tractors carve up vast soybean fields, sucking in dry pods and leaving a trail of dust.
Farmers predict a record crop here in Mato Grosso, the country's new agricultural frontier. Brazil is the world's second largest soybean producer after the United States and Mato Grosso accounts for a third of all output.
But that is only half of the picture.
Mato Grosso is also home to a vast stretch of virgin rain forest, swaths of semi-arid savannah and Xingu National Park.
The battle for land here has pitched environmentalists against ranchers and farmers. A new Forest Code being debated in Congress has further heightened tensions.
Former Environment Minister Marina Silva says if passed, it could be disastrous for remaining forest
"It's a setback without precedent after the 23 years of progress we've made," she told CNN.
Nearly a fifth of the Brazilian forest has been lost since 1970, but over the last six years, Brazil has cracked down on clear-cutting, reducing the rate of deforestation by 80 percent.
The new bill eases limits on deforestation and extends an amnesty to some who cut down trees illegally in the past.
The rural lobby in Brazil's Congress thinks it doesn't do enough to protect growers who've helped turn Brazil into an economic powerhouse.
President Dilma Rousseff has said she would veto a bill that extended a blanket amnesty. The legislation that came out of the Senate was a compromise backed by the government.
But unable to forge a consensus in Congress, the government has repeatedly delayed voting in the lower house.
The administration wants the law passed before June when Rio de Janeiro will host the Rio + 20 UN Conference on Climate Change, the 20th anniversary of the landmark Earth Summit.
In Mato Grosso, many farmers support the bill.
"I think the forest code will solve a lot of problems," said Saulo Cunha, who owns extensive corn and soybean fields outside of Canarana. "It will legalize producers who are illegal not because they want to be, but because of external factors."
Forty years ago, Mato Grosso was Brazil's wild west. It was largely uninhabited, covered by native forests. Settlers were encouraged by the government slash and burn.
They helped turn Brazil into one of the world's major breadbaskets.
Now, laws require between 20% and 80% of that land be preserved as forest, especially along riverbeds.
Under the new code, farmers who broke the law won't have to pay fines. They can get legal by re-planting native trees.
Cunha has already started.
But the new code also contains enough loopholes to virtually guarantee that many pastures and fields will never be restored.