By Christopher Whittall and Tommy Stubbington 

China's devaluation of its currency jolted global markets Tuesday, hitting stocks and commodities and boosting government bonds.

The S&P 500 fell 0.7% in early trade. The pan-European Stoxx Europe 600 index was down 1.3% late afternoon in Europe. Oil and metals prices also fell sharply, while demand for haven assets pushed down bond yields in the U.S. and Europe, as investors worried that Beijing's move signaled growth concerns over the world's second-largest economy.

Financial markets have reacted to signs that Chinese authorities believe it is necessary to act to boost flagging growth, said Ewen Cameron Watt, chief investment strategist at BlackRock's Inc.'s Investment Institute.

"For markets today it's a case of shoot first, ask questions later," said Mr. Watt, whose firm oversees $4.7 trillion in assets.

A weaker yuan could hurt the competitiveness of firms outside China by making their goods and services relatively more expensive, while companies that generate sales in China could find revenue and profit generated in yuan are worth less in their home currency.

"Worries about what this might mean for the competitiveness of the West versus the East" are driving the stock market selloff, said Chris Jeffery, an asset-allocation strategist at Legal & General Investment Management.

Shares of companies that export to China, including luxury-goods firms, car makers and mining companies, came under the most intense pressure.

In Europe, shares in LVMH Moët Hennessy Louis Vuitton SE fell 4.9% and Gucci-owner Kering SA was 3.4% lower. Premium auto makers BMW AG and Daimler AG both lost more than 4%, dragging Germany's export-heavy DAX index to a 2.5% decline.

Shares in BHP Billiton PLC were down 4.6% and Rio Tinto PLC lost 2.9%.

Commodity prices, which are sensitive to Chinese demand, fell. Brent crude oil was down 3.2% at $48.82 a barrel.

Copper hit its lowest level since July 2009 at $5,109 a ton. Aluminum also sank to a six-year low at $1,573.50 a ton.

Yields on 10-year U.S. Treasury bonds fell 0.08 percentage point to 2.15%. The equivalent German yield fell a similar amount to 0.59%. Yields fall as prices rise.

Most Asian bourses fell and currencies sank. Japan's Nikkei 225 index fell 0.4%. The Shanghai Composite Index ended flat.

"The market is still trying to work out if this is a one-off move or the start of something more significant," said Talib Sheikh, a multiasset fund manager at J.P. Morgan Asset Management, which oversees $1.8 trillion in assets.

"We think the risks are they'll have to engage in further measures" to weaken the currency, he added.

Athens stocks bucked the trend after progress toward a third bailout for Greece.

The Athex Composite index was 2.1% higher. Greek stocks saw some of the largest gains in Europe, with National Bank of Greece SA up 5.1%.

Greece and its international creditors reached an agreement in principle to provide the country with a bailout worth as much as EUR86 billion ($94.4 billion), but some details remained unresolved.

In currency markets, the euro was up 0.2% against the U.S. dollar at $1.1082. The Japanese yen fell 0.3% against the buck.

Write to Christopher Whittall at christopher.whittall@wsj.com and Tommy Stubbington at tommy.stubbington@wsj.com