Sao Paulo, Brazil (CNN) -- Brazilian President Dilma Rousseff on Friday vetoed 12 articles of a controversial forest bill approved by Congress last month, which was promoted by the powerful agriculture lobby but slammed by environmentalists.
The legislation updates the complex Forest Code, regulating how much and what kind of land should be maintained as native forest and how much can be cleared for ranching and agriculture.
Rousseff's decision comes less than a month before Rio de Janeiro is due to host a high-profile U.N. summit on sustainable development. Many Brazilians had pushed for a complete veto, staging protests across the county and collecting 1.9 million signatures for a petition.
Instead, Rousseff opted for line-item vetoes of articles that many said would grant amnesty to those who had illegally cleared land.
She vetoed sections that would have eliminated reforestation requirements and sharply reduced the area around water sources that must be maintained as forest.
Brazil's controversial forest code The Amazon rainforest covers a huge area, roughly half as large as the United States, with about 60% of it in Brazil.
It is estimated that nearly a fifth of the Brazilian forest has been lost since 1970, but over the past decade, authorities cracked down on clear-cutting, reducing the rate of deforestation by 80%.
Rainforest home to vast treasury of life
Former environment minister and presidential candidate Marina Silva has been a loud critic of the bill.
"It's a setback without precedent after the 23 years of progress we've made," she said.
Sen. Katia Abreu, who represents the agriculture and ranching lobby, said the question of reforesting around rivers is more complicated than it appears.
"There are a lot of people who only have a tiny plot of land which is entirely inside the river margins," she said. "What are they going to do with those people? How are they going to reimburse them?"
For years, the Brazilian government encouraged settlers to slash and burn forests in the sparsely populated center, north and west of the country for farming and ranching.
Over three decades, Brazil went from being a food importer to an agricultural powerhouse.
The new Forest Code has been an attempt to reach a compromise for farmers and environmentalists.