SEOUL (Reuters) – South Korea’s factory production unexpectedly jumped in May, led by cars and chips, official data showed on Friday, while retail sales also rose last month in an encouraging sign for a slowly recovering economy.

The industrial output index rose 3.2% in May on a seasonally-adjusted monthly basis, the Statistics Korea data showed, compared with losses of 0.6% in April and 0.8% tipped in a Reuters survey.

The gain also topped the highest estimate of a 2.8% rise in the poll.

By product, output of automobiles jumped 8.7% and semiconductors rose 4.4% over the month, whereas communication devices slumped 16.9%.

Factory output fell 7.3% on an annual basis, which was also milder than a 9.0% decline in April and 8.4% drop expected by economists.

The finance ministry said after the data that it showed the economy was on a recovery path after a slight correction the previous month. Downward pressure has eased though risks remain, it added.

Factory output will rebound in the second quarter after four straight quarters of losses, as exports bottom out, the ministry said.

The all-industry production index, which includes both the manufacturing and services sectors, rose 1.3% in May on-month, recouping April’s 1.3% loss.

Retail sales rose 0.4% in May, after dropping 2.6% in April, which was the worst in five months.

(Reporting by Jihoon Lee; Editing by Shri Navaratnam and Jacqueline Wong)