Factories in Asia and Europe all but stagnated in July, according to business surveys that showed the weakest rates of growth since major industrial powers were struggling through the 2009 recession.

While stock markets rose on signs of a last minute solution that would avoid a U.S. debt default, manufacturing purchasing managers indexes (PMIs) provided the latest evidence of a slowing global economy.

The euro zone manufacturing PMI, which gauges the activities of thousands of businesses, fell to 50.4 in July from 52.0 in June -- its worst showing since September 2009 and barely above the 50 mark dividing growth and contraction.

Perhaps more worryingly, China's official government PMI dropped to 50.7 from 50.9 in June, its weakest in more than two years, while the HSBC PMI fell below the 50 mark for the first time in a year -- to 49.3 in July from 51.6.

China was the main engine of growth as the developed world sank into recession after the 2008 financial crisis and signs of a slowdown there would worsen the global outlook at a time when both the U.S. and European economies are struggling with debt crises.

All eyes will also be on the United States' ISM manufacturing survey, due at 1400 GMT, which is expected to dip as well but still show a more positive reading of 54.9 points.

In Germany, the euro zone's key growth engine in the recovery thus far, manufacturing growth fell to a 21-month low after new orders contracted for the first time in more than two years.

If you're looking at Germany, and if you're looking at the trends over recent months, it does seem as though sentiment in the euro zone has turned down, said Mark Miller, global economist at Lloyds Banking Group.

Miller outlined the difference between the slowdown in China -- which he said was growth responding to a series of interest rate and bank reserve requirement hikes -- and Europe, where economies are close to stall speed.

In some cases, like Greece, they are already contracting.

Even in the UK, which so far has been shielded from the crisis gripping the euro zone, the manufacturing PMI fell to 49.1 from 51.4 in June -- the first time below the 50 mark since the country was in recession two years ago.

The UK is going through more than just a little local difficulty, said Peter Dixon, economist at Commerzbank.

You've got a slowdown in global economy and a fall-off in domestic demand, and that's a pretty toxic combination.

While the decline in the UK PMI was worrying, the likes of Spain and Ireland saw contraction among factories only deepening in July.

EMERGING PROSPECTS

Emerging market are also taking a hit.

Indian manufacturing growth slowed in July for the third month in a row. The HSBC PMI dropped to 53.6, from 55.3 in June, the lowest level since November 2009.

New export order growth in China, the world's biggest exporter, hit its lowest level in 17 months, the official survey showed.

But HSBC said new export orders in India fell in July at their fastest pace in 29 months and in Taiwan, home to the world's two biggest contract computer chip makers, they fell markedly and for the first time in nine months.

There is still a lot of uncertainty about how global demand will hold up, said Vishnu Varathan, economist at Capital Economics in Singapore.

Many economists prefer to describe China's economic growth as a slowdown rather than slump. But some say Beijing is treading an increasingly fine balance between fostering growth and fighting inflation, especially as its monetary policy tightening campaign runs into its 10th month.

Bucking the trend, South Korean manufacturing growth accelerated for the first time in seven months in July and new export orders also picked up.

(Writing by Andy Bruce and Swati Bhat, Editing by Ross Finley and Patrick Graham)