(Adds further budget figures)
BRASILIA, Oct 31 (Reuters) - Brazil posted a primary budget deficit of 26.643 billion reais ($8.38 billion) in September, central bank data showed on Monday, highlighting the uphill battle faced by the government to close what could be a record shortfall this year.
The deficit was in line with market expectations for a gap of 26.5 billion reais and followed a shortfall of 22.26 billion reais in August.
The deficit, the eighth so far this year, stems from a sharp drop in tax revenue that led the central government primary balance, which does not include states' budget results, to show a gap of 25.303 billion reais for September.
Brazil accumulated a primary deficit of 188.3 billion reais in the twelve months through September, well above the official 2016 target of 163.9 billion reais. In the first nine months of the year, the primary deficit was around 85.5 billion reais, or about 52 percent of the full-year target.
The primary balance, or the budget result prior to interest debt payments, is a key indicator of a country's capacity to repay its debt. A surge in the budget deficit after years of heavy spending cost Brazil its investment-grade rating.
The overall budget deficit, which includes interest debt payments, rose to 67.1 billion reais, remaining near 10 percent of gross domestic product in the 12 months through September.
$1 = 3.1805 reais Reporting by Cesar Raizer; Editing by Bernadette Baum and Meredith Mazzilli