TOKYO, Aug 20 (Reuters) - Japan's exports hit a monthly record in July, underscoring resilient global demand and offering support to an ‌economy increasingly reliant on overseas shipments to counter weak domestic demand.

Total ‌exports by value rose 23.2% year-on-year to a record 11.5 trillion yen ($72.62 billion) in July, data showed ​on Thursday, more than the median market forecast for a 19.9% increase and following a 19.3% rise in June.

The trade figures follow separate data this week showing Japan's economy expanded for a third consecutive quarter in April-June, with strong exports helping ‌to offset weak private consumption ⁠and business investment.

The resilience of Japan's exports could support the case for the Bank of Japan to continue to normalise monetary ⁠policy, as the central bank is set to raise rates as soon as September.

Exports to the United States in July rose 22% from a year earlier, while shipments to ​China ​were up 25.8%, the data showed.

Imports in ​July grew 27.8% from a year ‌earlier, compared with market forecasts for a 26.5% increase.

As a result, Japan recorded a trade deficit of 634.5 billion yen in July, compared with a forecast for a deficit of 680 billion yen.

The war in the Middle East earlier this year disrupted shipping through the Strait of Hormuz and triggered a surge in ‌crude oil, petrochemical and other commodity prices, raising ​Japan's import bill because the country relies heavily ​on overseas energy supplies.

Although oil ​prices retreated in June after shipping routes were partially restored, the ‌impact on import values typically appears ​with a lag because ​customs-based import prices reflect contracts agreed weeks earlier.

Higher commodity and energy costs have also fed through supply chains, allowing many Japanese manufacturers to continue ​passing on costs to ‌overseas customers. As a result, export values have been supported by higher ​prices even as growth in export volumes remained subdued.

(Reporting ​by Makiko Yamazaki; Editing by Sam Holmes)