The estimated budget gap last year was equal to 1.76 percent of gross domestic product (GDP), narrower than both the government's original plan of 2.19 percent and the latest previous estimate of 1.83 percent, making it the smallest deficit since 2012, Sri Mulyani Indrawati told a news conference.

"This is the first time since 2012 that state budget revenues were bigger than targeted," Indrawati said of the 2,202.2 trillion rupiah ($152.45 billion) budget.

The former World Bank managing director initially said in a Facebook post the deficit was 1.72 percent and that the budget had a surplus in its primary balance, or budget balance before interest payments.

At the news conference, she said the primary balance was still in the negative but was moving closer to zero.

Southeast Asia's largest economy saw its rupiah currency plunge to the weakest in 20 years in 2018 due to capital outflows linked to worries about its twin deficits, U.S. interest rate increases and concerns about the fallout for Asia from the U.S.-China trade war.

However, inflows towards the end of the year bounced it back and the currency closed the year 6 percent weaker compared to end-2017.

Authorities' policy responses to the falling rupiah, which include jacking up interest rates, raising import taxes and delaying infrastructure projects, might hurt GDP growth, Indrawati said.

She estimated the economy expanded 5.15 percent in 2018, marginally better than 2017's 5.07 percent but slower than the official target of 5.4 percent.

But despite the slower-than-expected growth, tax collection was boosted by "an increase in compliance" after a 2016-7 tax amnesty, she said.

Higher prices of coal and crude oil also pushed government revenues up, Indrawati said, offsetting oil and gas lifting that missed target.

The increase in revenues meant the government had enough funds to cover all the additional spending in 2018, while at the same time cutting down bond issuance, Indrawati said.

The government had to spend more on some events it hosted last year, including Asian Games, as well as inject 10.1 trillion rupiah to cover for cash shortfalls in state health insurer BPJS Kesehatan.

It also spent 153.5 trillion rupiah on energy subsidies, 62 percent more than initially budgeted, due to fluctuation in global oil prices.

"For 2019, on the one hand we're optimistic, but we also have to look at the field and we need to be careful," Indrawati said, noting that uncertainties around exchange rates and oil prices remain.

(Reporting by Gayatri Suroyo; Editing by Kim Coghill)

By Maikel Jefriando and Gayatri Suroyo