TOKYO (AP) — Japan reports that its trade surplus fell more than 40 percent in October from a year earlier as costs for imports of oil, gas and coal surged.

Customs figures released Monday showed imports rose almost 19 percent from the same month a year earlier in October while exports were up 14 percent. The resulting surplus of 285.4 billion yen ($2.54 billion) compared with a 481.2 billion yen surplus a year earlier.

Japan’s surplus with the U.S. jumped 11 percent and exports to China were sharply higher.

While imports have risen thanks to higher costs for crude oil and other commodities, Japan’s export sector is helping drive a moderate recovery in the economy thanks to revived demand in major markets such as China and the U.S. for vehicles, electronics and machinery.