RIO DE JANEIRO — Hours after leaders of some of the world’s wealthiest countries pledged more than $22 million to help combat fires in the Amazon rainforest, Brazil’s government angrily rejected the offer, in effect telling the other nations to mind their own business — only to later lay out potential terms for the aid’s acceptance and then, on Tuesday evening, accepting some aid from Britain.

President Jair Bolsonaro of Brazil expressed his ire in a series of Twitter posts on Monday, extending his verbal feud with President Emmanuel Macron of France, who had announced the aid package at the Group of 7 summit meeting.

But early the next day, Mr. Bolsonaro offered possible terms for its acceptance. If Mr. Macron withdrew what he called personal insults and insinuations that Brazil does not have sovereignty over the Amazon, he said, he would reconsider.

“He will have to withdraw his words, and then we can talk,” Mr. Bolsonaro said.

For Mr. Bolsonaro, who has governed as a far-right populist stoking nationalist sentiment, the defiant rebuff of the G7 aid played well to his base. But an outright rejection of any outside help might also have undermined the nation’s efforts to control the fires, possibly further eroding Mr. Bolsonaro’s plummeting popularity.