By Anna Hirtenstein and Chong Koh Ping

U.S. stocks opened slightly lower, after a steep drop in Hong Kong shares, as rising tensions between Washington and Beijing and the gloomy outlook for China's economy weighed on investors' sentiment.

The Hang Seng Index closed down 5.6% in its worst day since July 2015 after China moved to impose new national-security laws on the city.

The S&P 500 edged lower by less than 0.1%, while the Dow Jones Industrial Average traded 23 points lower shortly after the opening bell in New York. The tech-heavy Nasdaq Composite Index dropped about 0.1%.

The pan-continental Stoxx Europe 600 traded roughly flat, retreating 0.1%, but trimming an earlier dip after the European Central Bank released minutes from its policy meeting in late April.

"The ECB comments strongly suggest that they're ready to do something and sooner rather than later," said Peter Schaffrik, a global macro strategist at RBC Capital Markets. This will most likely be an extension to the bank's asset purchase program possibly next month, which boosted equities on Friday, he said.

Earlier in the day, China scrapped its economic growth target for 2020 in a stark acknowledgment of the challenges facing the world's second-largest economy, sending crude oil and metal prices sharply lower.

"Anything that knocks China's growth rate, whether it's a slower recovery from the coronavirus or a rise in tensions with the U.S., will weigh on global growth expectations," said Seema Shah, chief strategist at Principal Global Investors. Friday's market moves may also be outsized due to lower liquidity, as many traders in Europe took the day off to extend a long weekend, she said.

Beijing's decision to omit a formal target comes amid the sharpest contraction in four decades precipitated by a sudden halt in manufacturing activity because of the coronavirus pandemic. The nation's policy makers are signaling that they won't rush to introduce additional stimulus measures, which suggests more economic pain for countries that have become increasingly reliant on China as an engine of growth.

China's proposed national security law would challenge the financial hub's autonomy and threatens to increase tensions with the U.S. Congress condemned the move, with senators promising an urgent push on legislation that would impose sanctions on Chinese officials and institutions involved in undermining Hong Kong's Western-style rule of law.

"The market had gotten kind-of used to dealing with the coronavirus and terrible economic indicators, but potential disruption from a trade war is proving to be too much for sentiment," said David Madden, a market analyst at brokerage CMC Markets.

The dollar strengthened as investors moved into haven assets, with the ICE US Dollar Index rising 0.4%. The yield on the 10-year U.S. Treasury bond fell to 0.656%, from 0.677% Thursday. Gold rose 0.8%.

Brent crude, the global oil benchmark, fell 3.6% to $34.75 a barrel. The gauge for U.S. crude fell 3.7%. Copper, a closely watched metal for its use in industrial activity, slipped more than 2%.

"China is today the biggest importer of crude oil, so Chinese growth is hugely important for oil demand," said Bjarne Schieldrop, chief commodities analyst at Nordic bank SEB. "But at the same time, demand is ticking up and supply is ticking down," as Asian countries reopen, he said.

Ahead of the opening bell in New York, Hewlett Packard Enterprises dropped 7.1% after its fiscal second-quarter results fell short of Wall Street's expectations.

In Asia, most major stock benchmarks ended the day lower. China's Shanghai Composite Index fell 1.9% while South Korea's Kospi Index retreated 1.4%.

"Any attempts by China to become more assertive will cause some flashpoints locally," said Jim McCafferty, joint head of Asia-Pacific equity research at Nomura in Hong Kong. That could help stoke broader geopolitical tension, he said.

Markets are caught between poor economic data and U.S.-China tensions on one side, and governments' economic-support measures on the other, according to Ankit Khandelwal, chief investment officer at Maitri Asset Management.

"The tension between the U.S. and China might dictate the near-term movements of the markets," Mr. Khandelwal said.

Chinese Premier Li Keqiang detailed bond programs totaling 4.75 trillion yuan ($667 billion) to help fund China's recovery from the coronavirus. The proceeds will be channeled to local governments to help boost employment, consumption and investment.

"This is very different from in the past," when Chinese stimulus didn't go directly into local governments' coffers, said Chaoping Zhu, a Shanghai-based global market strategist at J.P. Morgan Asset Management. However, the measures have disappointed some Chinese investors, since it meant less capital would flow into shares and property, he said.

"The government is not in a hurry to have a new round of very aggressive stimulus measures. Pumping in a lot of money will cause property prices to rise sharply again," Mr. Zhu said.

Write to Anna Hirtenstein at anna.hirtenstein@wsj.com and Chong Koh Ping at chong.kohping@wsj.com