Brazilian President Jair Bolsonaro moved toward accepting foreign aid to battle the raging Amazon rainforest fires — but insisted that the South American country must independently decide how the aid is spent, an official announced.

Just a day after Bolsonaro’s chief of staff tossed cold water on French President Emmanuel Macron’s offer of $20 million in G-7 aid, the president gradually opened himself up to the possibility Tuesday.

“The Brazilian government, through its president, is open to receiving financial support from organizations and countries,” presidential spokesman Rego Barros said. “This money, when it enters the country, will have the total governance of the Brazilian people.”

Governors of states in the Brazilian Amazon have told Bolsonaro that they needed the money to help fight the record wildfires sweeping through the world’s largest tropical rainforest.

Bolsonaro, in turn, pledged to agree on a package of legislative measures with the states by Sept. 5 to help avoid further fire surges.

“We think that it’s not the moment to turn down money,” Flávio Dino, the governor of Maranhao state, told reporters after a meeting on the matter. “The anti-environment rhetoric could expose Brazil to international sanctions.”

Macron, the host of this year’s G-7 summit, offered the multimillion-dollar sum to help fight the fires Monday during the gathering at the French seaside town of Biarritz.

In turn, Onyx Lorenzoni, Bolsonaro’s chief of staff, said that “maybe those resources are more relevant to reforest Europe,” and blasted Macron for not being able to avoid a fire on his own turf — the blaze that devastated Paris’ Notre Dame Cathedral in April.

Then early Tuesday, Bolsonaro said his country would accept the offer only if Macron retracted comments questioning Bolsonaro’s trustworthiness and commitment to protecting biodiversity.

“Then we can speak,” Bolsonaro said.

A diplomatic source in the nation’s capital, Brasilia, told Reuters the government had also accepted 10 million pounds from Britain to battle the fires — but Bolsonaro’s press office was not immediately available to comment.

Fires are common in Brazil in the annual dry season, but they are more widespread this year. Brazilian experts reported nearly 77,000 wildfires across the country so far this year, up 85 percent over the same period in 2018.

It is unclear how much of what is burning was already deforested for agriculture.