(Recasts, adds real movement and adds analyst comments)
BRASILIA, Sept 29 (Reuters) - The Brazilian real extended gains on Tuesday after the central government posted a smaller-than-expected primary budget deficit in August that eased market fears of a worsening fiscal crisis.
The central government account, which covers federal ministries, the central bank and social security, had a deficit of 5.081 billion reais ($1.25 billion) in August, well below some market expectations for a gap of more 10 billion reais. The central government had a primary deficit of 7.2 billion reais in July and 10.45 billion reais in August of last year.
The smaller deficit helped the real strengthen over 2 percent to 4.0123 per dollar in the mid-afternoon. Earlier in the day the real had weakened as much as 1 percent due to market fears President Dilma Rousseff will fail to pass a fiscal-savings package through a rebellious Congress.
Treasury chief Marcelo Saintive's warning that the government could extend its intervention in local debt to stabilize borrowing costs also helped the real.
A drop in spending on unemployment benefits and a delay in a year-end payment to pensioners as well falling current spending explained the smaller deficit in August.
Most analysts, however, still doubt the government will reach its target for a surplus of 5.8 billion reais or 0.10 percent of the Gross Domestic Product by year-end.
So far this year the central government has accumulated a deficit of 14 billion reais.
"This positive headline does not change our view that the government will not reach its target," economists with Sao Paulo-based Banco Fator said in a research note. "One-off revenues will be needed to reduce that deficit."
Rousseff is struggling to convince her wide-ranging alliance in Congress to back new tax hikes and spending cuts needed to rebalance the public accounts after years of heavy spending that cost Brazil its investment-grade rating.
$1 = 4.06 Brazilian reais Reporting by Alonso Soto and Luciana Otoni; Editing by Frances Kerry