(Recast, adds gross debt projections and context)
BRASILIA, Dec 27 (Reuters) - Brazil posted its worst-ever primary budget deficit for the month of November, erasing all of the gains recorded in the previous month and highlighting the government’s lingering challenge to rebalance the depleted public accounts.
The country’s primary budget deficit was 39.141 billion reais ($11.90 billion) in November, central bank data showed on Tuesday, wider than the 35.9 billion reais gap expected in a median forecast of economists in a Reuters poll.
In October, the country had a primary surplus of 39.5 billion reais thanks to revenues from a program that allowed Brazilians to pay fines and taxes to legalize their undeclared assets held abroad.
President Michel Temer has vowed to plug the widening budget deficit that has cost the once-booming economy its investment-grade rating and complicated an incipient recovery after two years of recession.
Despite the steep deficit in November, the government is widely expected to meet its deficit target of 163.9 billion reais in 2016. For next year, the government aims for a deficit of 143 billion reais.
The country’s public sector gross debt remained stable at 70.5 percent of gross domestic product in November.
For 2017, the central bank expects the country’s gross debt to climb to 76.9 percent of GDP. ($1 = 3.2887 reais) (Reporting by Marcela Ayres; Writing by Bruno Federowski and Alonso Soto; Editing by W Simon and JS Benkoe)