Beijing and Washington took a major step on Friday towards ending a dispute that threatened to boot Chinese companies, including Alibaba, from U.S. stock exchanges, signing a pact to allow U.S. regulators to vet accounting firms in China and Hong Kong.

U.S. regulators have for more than a decade demanded access to audit papers of U.S.-listed Chinese companies, but Beijing has been reluctant to let overseas regulators inspect its accounting firms, citing national security concerns. .

The deal marks a partial thaw in U.S.-China relations amid tensions over Taiwan and will come as a relief for hundreds of Chinese companies, investors and U.S. exchanges, giving China the chance to retain access to the world’s deepest capital markets if it works in practice.

If not, some 200 Chinese companies could be banned from U.S. exchanges, U.S. Securities and Exchange Commission (SEC) Chair Gary Gensler said. The agency has previously identified Alibaba Group, JD.Com Inc, and NIO INC among those at risk.

Announcing the deal, U.S. officials struck a cautious note, warning it was just a first step and that their view on China’s compliance would be determined by whether they are able to conduct their inspections unobstructed, as the deal promises.

“Make no mistake though: The proof will be in the pudding,” said Gensler. “This agreement will be meaningful only if the PCAOB actually can inspect and investigate completely audit firms in China.”

Still, the Public Company Accounting Oversight Board (PCAOB), which oversees audits of U.S.-listed companies, said it was the most detailed agreement the regulator has ever reached with China.

The China Securities Regulatory Commission (CSRC) said the agreement was an important step towards addressing the auditing issue and benefited investors, companies and both countries.

In principle, the deal appears to give the PCAOB what it has long-demanded, namely full access to Chinese audit working papers with no redactions, the right to take testimony from audit company staff in China, and sole discretion to select which companies it inspects.

U.S. officials said they had notified the selected companies on Friday morning and expected to land in Hong Kong, where the inspections will take place, by mid-September.

Regulatory Needs

The long-running dispute came to a head in 2020 when the United States passed the Holding Foreign Companies Accountable Act, which forced the SEC to take a tougher hand with U.S.-listed Chinese companies. The SEC finalized rules implementing the law in December, starting the clock ticking on potential Chinese company delistings.

“We have to hold China to the same standards as every other company and every other country that lists on American exchanges,” U.S. Republican Senator John Kennedy, a key architect of the 2020 law, said in a statement on Friday.

U.S. rules stipulate that if China is not found to be in compliance, its companies could be barred from U.S. exchanges by early 2024, but that deadline could be brought forward. Gensler said Chinese companies still faced delisting if the inspections were obstructed.

The PCAOB and SEC expect to make a determination on China’s compliance by the end of the year, officials said.

“This is seen as a positive first step. However, things are not fully cast in stone yet,” said Samuel Siew, market specialist at CGS-CIMB.