Japan’s industrial production fell more than expected in July as slowing economic activity in some overseas markets weighed on demand, while retail sales beat estimates.

Factory output declined 2% from June, the industry ministry said Thursday. Economists had forecast a 1.4% drop. Manufacturing machinery and electronic components were among the biggest drags on overall output, the ministry said. The auto industry was among sectors giving a boost.

A separate report showed that retail sales gained 2.1% in July from June, beating a 0.8% gain forecast by analysts. Sales rose 6.8% from a year earlier, also exceeding estimates.