WASHINGTON — An enforcement lawyer at the Securities and Exchange Commission says that the agency illegally destroyed files and documents related to thousands of early-stage investigations over the last 20 years, according to information released Wednesday by Congressional investigators.

The destroyed files comprise records of at least 9,000 preliminary inquiries into matters involving notorious individuals like Bernard L. Madoff, as well as several major Wall Street firms that later were the subject of scrutiny after the 2008 financial crisis, including Goldman Sachs, Lehman Brothers, Citigroup and Bank of America.

The S.E.C. is the very agency that is charged with making sure that Wall Street firms retain records of their own activities, and has brought numerous enforcement cases against firms for failing to do so.

The agency’s records were routinely destroyed under an S.E.C. policy, since changed, that called for the disposal of records of a preliminary inquiry that was closed if it did not get upgraded to a formal investigation, according to Congressional records and people involved in inquiries into the matter. The agency believes that both the original policy and the new rules comply with federal document-retention laws.