Global stocks retreated on Thursday alongside U.S. futures, with a four-day rally that had lifted world stocks to near-record highs stalling, after China said it would retaliate for U.S. legislation backing Hong Kong protesters, casting doubt on the prospect of a "Phase One" trade deal between the world's two largest economies. 

Global stocks slipped along with U.S. equity futures after President Donald Trump signed a bill late Wednesday backing Hong Kong protestors, supporting Hong Kong's autonomy and threatening sanctions against China for human rights violations.

The unexpected move just ahead of the U.S. Thanksgiving holiday prompted China to warn of "firm counter measures," spurring concern that a so-called "Phase One" deal that has been touted by the Trump administration as being "very close" to fruition won't happen.

"I signed these bills out of respect for President Xi, China, and the people of Hong Kong," Trump said in a statement. "They are being enacted in the hope that leaders and representatives of China and Hong Kong will be able to amicably settle their differences leading to long term peace and prosperity for all."

China's Foreign Ministry said Beijing is opposed to the bill's signing and threatened countermeasures if the U.S. doesn't change course. It didn't specify what those might be.

The Stoxx Europe 600 Index tracked declines in much of Asia, with automakers posting the biggest declines. Contracts on the main U.S. benchmarks all traded lower as China threatened retaliation to Trump's move, though Beijing stopped short of any immediate action. Hong Kong shares pared an initial retreat to post a modest drop alongside Japanese, Chinese and South Korean stocks.

Concern about the extent of Chinese retaliation did begin to ease during London trading, with London's blue-chip index slipping from two-month highs. 

"When you see the optics of siding with Hong Kong against the mainland, that would seem at face value to be intuitively antagonist to the prospect of the trade negotiations," Jeremy Stretch, head of G10 FX strategy at CIBC capital markets, told Reuters.

However, he said, "It may prove to be the case that despite the threat of a Chinese reprisal they may not be quite as significant or dynamic as feared.

Wall Street's main indexes closed at record levels for a third straight day on Wednesday, albeit in thin trading before the Thanksgiving holiday, after data showed U.S. economic growth had picked up in the third quarter and consumer spending had increased. 

The U.S. markets will be open for a shortened trading session on Friday, with both the New York Stock Exchange and the Nasdaq Stock Market open until 1 p.m. Eastern time. Bond markets will close at 2 p.m. Eastern. Currency markets will be open.

Related: 

Classic Holiday Trading: Light, Slow and Upward