South Korea’s economy expanded faster than expected in the final quarter of last year as heavy government spending offset a slump in exports.

The country’s real gross domestic product (GDP) in the quarter ended December grew 1.0 percent against the previous three months after two straight quarters of 0.6 percent growth, according to preliminary data released by the Bank of Korea (BOK) on Tuesday.

This was higher than market estimates, which expected a GDP growth of 0.84 percent in the fourth quarter. Against the year-ago period, the GDP expanded 3.1 percent.

For full 2018, the Korean economy grew 2.7 percent on year, retreating from the 3.1 percent gain in 2017 to post its slowest economic growth since 2012. The figure was still in line with central bank and government estimates.

The benchmark Kospi fell 0.32 percent to close Tuesday at 2,117.77. The Korean won fell 0.24 percent, or 2.70, against the U.S. dollar to 1,130.80.

The country’s economic growth picked up as a 3.1 percent on-quarter rise in government expenditure effectively made up for slowing exports in the fourth quarter, the BOK said. For the full year, government spending was up 5.6 percent, the highest in 11 years.

But government efforts to prop up the economy may soon wear off, analysts said, given worsening external conditions such as the sharper-than-expected economic slowdown of China and persistent trade tensions between the world’s two largest economies.

This bodes ill for Korea’s export-dependent economy. After successive quarters of robust growth, the country’s exports contracted 2.2 percent in the fourth quarter due to waning chip demand. Semiconductors are the country’s biggest export item, representing a quarter of its total shipments. But global outlook for the chip industry has turned grim as it faces a down cycle after two years of explosive growth.

Imports gained 0.6 percent, reversing from a 0.7 percent decline in the third quarter.

Facility investment rose 3.8 percent on quarter owing to increased spending in transportation equipment. But it was down 1.7 percent for full 2018, the lowest since 2009 in the wake of the global financial crisis.

Construction investment improved 1.2 percent in the fourth quarter but grew at the slowest annual pace in nearly two decades at 4.0 percent for the full year.

Private consumption gained 1.0 percent in the October-December period to deliver 2.8 percent annual growth, the highest in seven years.

Manufacturing and service output gained 0.8 percent and 0.7 percent, respectively, on quarter. Services were up 2.8 percent for full 2018, a four-year high.

The real gross domestic income was down 0.1 percent on quarter and up 1.1 percent for the full year, the lowest in a decade due to higher oil prices and deteriorating trade conditions.

The country’s gross national income per capita topped $31,000 in 2018, hitting the $30,000 milestone 12 years after it passed the $20,000 mark.