South Africa’s industrial output expanded in July as food and motor vehicle output rose, easing pressure on an economy that recently slipped into recession and is struggling for investment amidst policy uncertainty and possible credit downgrades.

The statistics agency in Africa’s most industrialised economy said on Tuesday manufacturing output rose by 2.9% year-on-year in July, following a revised 0.6 percent expansion in June.

Analysts polled by Reuters had expected a 1.1% year-year-on-year increase in July.

The rand responded positively to the data, strengthening to 15.0850 from 15.1200 before the release.

Analysts said manufacturing, which contributes 13 percent of gross domestic product and 11 percent of employment, is set to rebound for the rest of 2018 as inventories are replenished.

“This could be early signs of stabilisation in the sector, but we cannot rule out shocks especially as trade conditions are affected by the U.S.-China trade war,” said Isaac Matshego, senior economist at Nedbank.

The country slumped to a surprise recession, data showed last week, as manufacturing along with agriculture and retail shrank. Finance Minister Nhlanhla Nene on Monday said revenue collection could fall below target due to the recession.