Demoted after leading Brazil's largest seizure of illegal lumber in the Amazon last year, police chief Alexandre Saraiva wanted to instead defend the country's rainforest through politics - by running for a seat in the lower house of Congress.
Yet in Sunday's general election, Saraiva and three other environmental officials who ran for office lost their races, while several winners were people connected to President Jair Bolsonaro's government and accused by advocates of dismantling green policies.
"My conclusion is that the Brazilian people do not really care for the Amazon," said Saraiva, who while campaigning for the Brazilian Socialist Party (PSB) touted his "civic duty" to tackle soaring deforestation under Bolsonaro's far-right government.
In the presidential race, leftist frontrunner Luiz Inacio Lula da Silva won 48.4 percent of votes versus 43.2 percent for Bolsonaro - with the incumbent performing better than the polls predicted.
A runoff vote is set for Oct 30 between ex-president Lula - who has vowed to boost conservation efforts in the Amazon while developing the region economically - and Bolsonaro, who has called for more commercial farming and mining in protected areas.
Internationally, the election is seen as a key opportunity to stem the rapid destruction of the Amazon forest and help curb climate change and accelerating losses of nature and wildlife.
In the lower chamber of Congress, Bolsonaro's Liberal Party (PL) was the biggest election winner, taking 99 of the 513 seats, while Lula's Worker's Party (PT) won 68.
In a bigger surprise, Bolsonaro's party nabbed 13 of the 27 positions in the upper house - the Senate - while Lula's party had nine.
Among the winners were Bolsonaro's former vice-president, Hamilton Mourao, and five of his ministers, including ex-agriculture minister Tereza Cristina.
Many of those elected have backed Bolsonaro's policies of expanding agriculture and resource extraction in the Amazon, which has led to growing forest destruction.
Carlos Minc, a former environment minister under Lula from 2008 to 2010, said that if Bolsonaro is re-elected, he will have a powerful base from which to pass legislation he was unable to get through during his first term.
"The biggest enemy of environmental issues is Bolsonaro," said Minc, who was re-elected as state congressman for Rio de Janeiro as a member of the PSB.
Bolsonaro's administration has overseen large-scale expansion of farming, ranching and mining in the Amazon and other natural areas in Brazil, but he has repeatedly defended its record on the environment.
Minc said he was surprised by a strong performance from PL member Ricardo Salles, Bolsonaro's ex-environmental minister.
Salles was elected to the lower house with around three times as many votes as Marina Silva, a former presidential candidate who won a seat as a representative for Sao Paulo with the Brazilian Sustainability Network Party (REDE).
Silva, an Amazon-born environmentalist, was head of the environment ministry under Lula from 2003 to 2008. During that period, the Amazon deforestation rate decreased by almost half.
Under Bolsonaro, deforestation in the Amazon has surged to a 15-year high, and government satellite data shows that 7,135 square kilometers (2,754 square miles) were cleared from January to August this year, a rise of 19 percent from the same period in 2021.
Salles was criticized by international green activists in 2020 after urging Brazil's government to push through environmental deregulation while the public was distracted by the pandemic.
He quit his cabinet role in June 2021, facing a criminal investigation into whether he obstructed a police probe of illegal logging in the Amazon. This followed an accusation from Saraiva that Salles had been acting on behalf of loggers.
Salles' election result means he is likely to get a seat on the environmental commission in Congress, or even become its president, said political analyst Jose Niemeyer, who works in international relations at Ibmec university in Rio de Janeiro.
Among other things, the commission decides on what kind of environmental legislation is put to a vote in Congress.
"Salles will gather a lot of power around him," said Niemeyer.
RUN-OFF FOR AMAZON'S FUTURE
However, political experts said environmental policy would still ultimately remain in the hands of the president, who has the power to push or veto legislation put forward by Congress.
In his manifesto, Lula proposed a net zero deforestation policy. And in the last presidential debate before Sunday's vote, he vowed to prohibit illegal small-scale mining and to restore degraded pastures for agriculture instead of clearing new areas.
As president, Bolsonaro has kept his campaign promise not to recognize new indigenous territories, and presented a bill to legalise mining in such areas. He also backs a bill to expand turning illegally seized public land into a private asset.
In his bid for re-election, Bolsonaro said he planned to balance "environmental protection with fair economic and sustainable growth for all".
Green experts believe Congress may resist environmental policies Lula could propose, but say the former leader is known for his negotiation skills and would be able to sway centrists, including more pragmatic members of Bolsonaro's party.
Few people were elected to Congress on an environmentalist agenda, but those who were, such as Silva, are well-qualified and will be able to make a meaningful impact, said Brenda Brito, associate researcher at the Amazon Institute of People and the Environment (Imazon) - a non-profit that tracks deforestation.
The left did well in Congress in Sunday's election, with mainly centrist and center-right parties losing seats to Bolsonaro's far-right party, according to political analysts.
The Socialism and Liberty Party (PSOL), which sits to the left of Lula's party politically, had its best performance to date, winning 12 seats - an increase of four.
PSOL has been the most vocal party in denouncing Bolsonaro's environmental policies.
Among the winners from PSOL are two indigenous women, Sonia Guajajara and Célia Xakriaba. Brazil's previous sole indigenous person in Congress, Joenia Wapichana, did not win re-election.
"There are over 150 bills on Congress that go against our rights," said Kleber Karipuna, executive coordinator of the Articulation of Indigenous Peoples of Brazil (APIB), which represents many of the country's 900,000 native people.
"Now our fight is to stall these anti-indigenous bills," she said.
While experts and pollsters say Lula will likely win the election, Saraiva said a Bolsonaro victory cannot be ruled out.
"Lula will probably win, but I don't believe this is absolutely certain. These victories from the far-right will add fuel to Bolsonaro's campaign", he said.
A Bolsonaro victory would be a death knell for the Amazon in Brazil, he said.
"This government's complicity with destruction is unambiguous," he added.