The Chinese affiliate of Big Four audit firm Deloitte agreed to pay a $20 million penalty and undertake extensive remedial measures as part of a settlement with the U.S. Securities and Exchange Commission (SEC) for audit failures that included asking clients to conduct their own audit work.

Deloitte Touche Tohmatsu Certified Public Accountants (Deloitte China) audits companies in China that trade on U.S. exchanges on behalf of the U.S. arm of the global firm. Deloitte China is registered with the Public Company Accounting Oversight Board (PCAOB) and must abide by its standards.

On multiple occasions, Deloitte China invited its clients to create paperwork that gave the appearance Deloitte China had tested their financial statements and internal controls when “there was no evidence in the audit file that they had in fact done so,” according to the SEC’s order filed Thursday.

Deloitte China audit personnel were not properly supervised and allowed clients to pick and choose what samples to submit for testing, the order said. This created the risk clients could “strategically choose” samples, which would impair the reliability of the testing, the SEC said.

Deloitte U.S. relied on these deficient component audits in issuing its audit opinions, the order said.

Deloitte China failed to meet professional auditing standards. It violated elementary audit rules of the PCAOB and the SEC’s Rules of Practice, the agency alleged.

“[B]asic, foundational auditing requirements are necessary to instill trust in our capital markets,” said SEC Chair Gary Gensler in a press release. “It’s a privilege for issuers to access our markets—the largest, deepest, most liquid markets in the world. Investors in U.S. markets should be protected—and have trust in a company’s financial numbers—regardless of whether an issuer is foreign or domestic.”

Gensler further noted the importance of the Holding Foreign Companies Accountable Act and need for the PCAOB to be able to inspect China-based audit firms in order to identify weaknesses similar to those alleged at Deloitte China.

The SEC agreed to Deloitte China’s offer to settle partly because the firm’s “extensive” cooperation and remedial actions. Deloitte China engaged a third-party law firm to investigate as soon as it became aware of the alleged misconduct and informed the PCAOB of the activities, the SEC said.

Deloitte China agreed to an independent review of its policies and procedures—to be monitored by Deloitte Global—to ensure compliance with PCAOB auditing standards. Deloitte China will adopt any recommendations as a result of the review, the SEC said. The chief executive officer of Deloitte China will certify to the global office it has implemented the recommendations.

Deloitte China further agreed to annual reviews by Deloitte’s global office for three years.

All Deloitte China auditing personnel with U.S. clients must complete at least 16 hours of training each year for the next three years. Supervisors must complete at least 24 hours of training each year.

Deloitte China did not admit or deny the SEC’s findings. In addition to paying the fine, the firm agreed to be censured.

Deloitte U.S. did not respond to a request for comment.