Japan's exports slipped in July as annual drops in exports to the United States and China accelerated, in a sign that the impact of stimulus measures in major economies worldwide may be starting to wane.

Exports to the United States have lagged improvements in shipments to Asia as the world's largest economy struggles to pick up steam, while the yen's rise against the dollar also played a part.

But exports to the fast-growing Chinese economy also fell at a faster annual pace as a surge in state spending and loan growth failed to mask tepid domestic demand there.

The annual fall was largely in line with market expectations, but in another sign of slowing momentum, Japan's exports fell from the previous month for the first time in two months.

Some overseas stimulus programs have already expired, and economists warn that as such fiscal support runs its course, exports could slow while weak labor markets in the United States and Europe mean consumers won't be able to pick up the slack.

In a sign demand within Japan isn't strong either, prices for business-to-business services marked a record annual fall for the third straight month in July, as deflation deepens.

Falls in exports have been moderating in recent months on companies' restocking efforts and government stimulus worldwide. But the July datas indicate that the recovery momentum is losing steam, said Seiji Shiraishi, chief economist at HSBC Securities.

It is questionable whether exports will continue to recover once the stimulus effect runs out because global final demand may not turn up fully.

On a seasonally adjusted basis, exports fell 1.3 percent in July from June, trade data showed on Wednesday, the first drop in two months.

Compared with a year earlier, Japan's exports fell 36.5 percent in July. That was slightly less than the median forecast for a 38.6 percent fall in July, but faster than the 35.7 percent annual decline in June.

Exports fell at a faster annual rate due to slower shipments of cars to the Middle East, Russia and the United States. Exports of steel and semiconductors to Asia also saw faster annual falls.

In July, the yen was 12.4 percent higher against the dollar than in the same month last year, which also weighed on Japan's exports, the data showed.

Altogether, Japan logged a trade surplus of 380.2 billion yen ($4 billion) in July, just short of the median estimate for a 385.0 billion yen surplus.

Exports of steel to China were weak, said Junko Nishioka, chief Japan strategist at RBS Securities, raising worries about a China-driven recovery scenario. Shipments of steel to China declined 29 percent in July from a year earlier, faster than the 19.1 percent annual decline in the previous month.

I think material exports to China will garner more attention in coming months, she said.

Overall exports to China fell 26.5 percent from a year earlier, faster than the previous month's 23.7 percent decline. Exports to the United States fell an annual 39.5 percent in July, also faster than a 37.6 percent drop in the 12 months to June.

Japan's economy returned to growth in the second quarter, becoming the third G7 country after France and Germany to emerge from recession, as exports rebounded and government subsidies at home lifted private consumption.

But economists say global trade may slow again as falling salaries and a lack of job security weigh on consumer spending.

Shipments from other export-oriented countries in Asia are also losing momentum, adding to evidence that global trade flows could wane. China and South Korea both logged bigger export falls in July than June.

One cloud on the horizon is what happens in the United States, particularly because they may not have the budget capacity to do more stimulus, said David Cohen, director of Asian economic forecasting at Action Economics in Singapore.

The Japanese are typical of other Asian exporters, and the recovery from a recession brought on by a financial crisis tends to be sluggish.

In one example of the temporary nature of stimulus measures, the U.S. government said last week it would end a program that gives rebates to car buyers for trading in less fuel-efficient vehicles.

Japan's corporate services price index, which tracks the cost firms charge each other for services, fell a record 3.4 percent in July from a year earlier. The fall accelerated for the fourth straight month in another sign of deepening deflation in Japan.

The BOJ watches the data to distinguish between the influence of weaker commodity prices and shrinking demand on overall consumer prices, data on which are due on Friday.

The drop was partly due to a sharp fall in freight costs from last year, when there was a surge driven by strong demand for commodities in China leading up to the Beijing Olympics.

But weak demand was playing an increasing role in the slide, with companies forced to cut advertising and leasing fees, a BOJ official told a briefing.

(Editing by Hugh Lawson)