The primary deficit of 22.267 billion reais ($6.88 billion) in August was well wider than market expectations for a gap of 18.5 billion reais. Central bank data showed it was the biggest deficit for that month in a historic series that began in 2001.

The deficit, the seventh so far this year and the second biggest after February, stems from a sharp drop in tax revenue that led the central government primary balance, which does not include states' budget results, to post a record gap of 20.3 billion reais for that same month.

Federal tax revenues fell 10.12 percent in August as a recession in its second year hampered consumption.

So far this year, the country has accumulated a primary deficit of 58.859 billion reais, which is about 36 percent of the 2017 official goal for a deficit of 163.9 billion reais.

The primary balance, or the budget result prior to interest debt payments, is a key indicator of a country's capacity to repay it debt.

The overall budget deficit, which includes interest debt payments, continues to hover around 10 percent of the gross domestic product in the 12 months through August.

A surge in its budget deficit after years of heavy spending has cost Brazil its investment-grade rating.

The International Monetary Fund on Thursday urged President Michel Temer to step up efforts to rebalance the public accounts by adopting a five-year plan to turn the deficit into a steep surplus to stabilize the rising debt burden.

Temer, who replaced leftist Dilma Rousseff earlier this year after she was impeached for allegedly doctoring the public accounts, has proposed a cap on public expenditure.

His government has agreed to remove states from the spending cap to ease its approval in Congress, but is considering a separate bill to limit their expenditure.

Economists believe those efforts will do little to revert the rising trend of the country's net debt that reached 43.3 percent of GDP in August. Only three years ago, that debt stood at 30.63 percent of GDP.

The bank's head of economic research, Tulio Maciel, said the bank expects net debt to climb to 46.2 percent in 2016 if the government meets its primary deficit goal.