(May 28): It was anything but an ordinary afternoon for Hong Kong stocks as Chinese lawmakers approved a controversial plan to impose national security legislation for the city.

See: China approves proposal for Hong Kong national security legislation

The Hang Seng Index plunged as much as 2.2% before erasing all its losses. A rally for Chinese companies spurred speculation that mainland-based funds were behind the gains. The gauge closed 0.7% lower.

There was also speculation of intervention in the currency market, with the offshore yuan strengthening just as traders said they saw some state-run banks selling dollars. Premier Li Keqiang opened a press conference at around 4 p.m. after The National People’s Congress approved the draft decision by a vote of 2,878-1 at its annual session in Beijing.

hong kong stocks

“There are signs that mainland funds are buying into big-cap Chinese firms in Hong Kong, such as financial stocks and telecom, to support the index,” said Steven Leung, executive director at Uob Kay Hian (Hong Kong) Ltd.

See also: Hong Kong economy resilient for now despite heightened political risks, says DBS economist

The Trump administration on Wednesday took the significant step of saying it could no longer certify Hong Kong’s autonomy from China, which was promised before the British handed the city back in 1997. The move could trigger a range of actions by the Trump administration, from sanctions on Chinese officials to revoking the city’s special trading status with the U.S.

The Hang Seng Index recouped almost all of its 2.2% loss in the first 90 minutes of the afternoon session, with Chinese firms including state-owned China Construction Bank Corp. and Industrial and Commercial Bank of China Ltd. the biggest contributors.

Mainland money is flowing into Hong Kong’s stocks at an unparalleled pace this year, offering support to a market at the centre of rising tensions between Beijing and Washington. Eligible investors, which can range from brokers to insurers or individuals with at least 500,000 yuan (S$99,035) in their trading accounts, pumped more than US$35 billion (S$49.65 billion) across the border, the most for the period in data going back to 2017.

History shows mainland buying tends to pick up when Hong Kong shares drop. Onshore investors bought the dip in March when the Hang Seng Index fell to its lowest in more than three years. State-backed funds have also stood by to help steady Hong Kong’s markets around key political events, such as in 2017 when Xi Jinping visited the city to mark 20 years of Chinese rule.