The head of Brazil's space research agency Ricardo Galvao is set to leave his job following a public dispute with President Jair Bolsonaro over deforestation statistics, a spokesperson for the science ministry said on Friday.

Preliminary data produced by the agency, known as INPE, showed an 88 per cent jump in deforestation in the Amazon rainforest in June compared to the same month a year ago. Data for July 1 to July 25, the latest available, recorded 1,864 square kilometers of deforestation, more than triple the amount in the month of July last year.

Bolsonaro responded angrily to the numbers, describing them last month as a lie, and personally attacking Galvao, who he said might be "in service to some NGO."

On Thursday, he said Galvao would be fired if he was found to have breached his confidence.

Galvao did not take the criticism lying down. In an interview on July 20 with national broadcaster Globo, he dismissed Bolsonaro's criticism as "bar talk" and "a joke of a 14-year-old boy that is not suitable for a president of Brazil." At the time, Galvao said he would not resign.

However, on Friday, Galvao told reporters as he left a meeting with the science minister that his position was no longer tenable, according to a recording broadcast on CBN.