* Export recovery needed to offset domestic demand slump * Offshore relocation of factories undermines export growth (Adds details on exports, monetary policy) By Stanley White TOKYO, Aug 20 (Reuters) - Japan's exports rose in July for the first time in three months in a tentative sign that overseas demand is starting to recover, which could raise hopes that exports can offset a slump in consumer spending.
The export data will be a relief for the Bank of Japan, which has predicated its economic growth and inflation forecasts on a rapid rise in exports as part of the government's "Abenomics" plan to energise the Japanese economy.
"The BOJ can say with more confidence that it will keep its monetary policy on hold," said Hiroshi Miyazaki, senior economist at Mitsubishi UFJ Morgan Stanley Securities.
"The government has already announced some steps to support corporate activity. Now it is simply a matter of reflecting these policies in next fiscal year's budget." July's 3.9 percent annual rise was roughly in line with a 3.8 percent increase expected by economists in a Reuters poll. It followed a revised 1.9 percent decline in the year to June.
Growth in exports was driven by increased shipments of cars to Europe, metal processing machinery and items such as liquid crystal displays, the data showed.
Japan's exports have struggled with weak demand in Asia for much of this year and a growing shift in production overseas - which has disappointed officials in the BOJ and the government.
Evidence that exports are finally starting to recover suggests the economy may rebound from a sales tax hike in April, which would ease pressure on policymakers to do more to support growth.
Exports to Asia, which account for more than half of Japan's total exports, rose 3.4 percent in July from a year ago as automobile shipments grew, finance ministry data showed on Wednesday, marking the first increase in three months.
Exports to China, another important market for Japan, were up 2.6 percent in July due to gains in shipments of metal processing equipment and car parts, the data showed.
Exports to the United States rose an annual 2.1 percent as Japan shipped more car parts.
However, exports of cars to the U.S. market tumbled 10.3 percent from a year ago, the fourth straight month of declines, as Japanese companies shifted production to the United States and other countries, a finance ministry official said.
"The data shows exports are recovering moderately as a trend, so external demand may offset some of the weakness in domestic demand ahead," said Takeshi Minami, chief economist at Norinchukin Research Institute.
"But export growth is unlikely to accelerate much from here. Europe's economy lacks momentum and this will weigh on growth of Japan's big Asian export markets like China," he said.
Prime Minister Shinzo Abe updated his economic growth strategy in June with a plan to lower the corporate tax rate and offer incentives in special economic zones to encourage companies to expand operations in Japan.
Japan's imports rose 2.3 percent in the year to July, compared with a median forecast for a 1.7 percent annual decline, as energy imports grew. That brought the trade balance to a deficit of 964 billion yen ($9.4 billion).
The economy shrank an annualised 6.8 percent in April-June, its biggest slump since the March 2011 earthquake, stoking fears that consumer spending had weakened more than expected after the April sales tax hike.
Exports also fell in the second quarter, showing that both domestic and external demand weakened.
Economists expect that Japan's gross domestic product will grow around 4 percent on an annualised basis in the current quarter, but many policymakers say exports must grow to ensure the economy remains on track.
The BOJ, however, has warned that the relocation of factories offshore, particularly for making cars, means that Japan may not be able to ramp up exports at will. (1 US dollar = 102.9200 Japanese yen) (Additional reporting by Leika Kihara; Editing by Eric Meijer)