The Securities and Exchange Commission sent a message to the investment community last week with its largest insider-trading case: The arm of American law enforcement has developed a longer reach.

A key to bringing charges against investment banker Dennis Levine, who is alleged to have used confidential information about major corporate deals to enrich himself by $12.6 million, was identifying Levine as the client of the Nassau subsidiary of a Swiss bank -- despite bank secrecy laws in the Bahamas.

The action followed by less than three months the SEC's recovery of $7.8 million from foreign investors charged by the SEC with earning illegal profits by trading on insider information in the stock of Santa Fe International Corp., another case that depended on unlocking bank secrecy.

"There is Santa Fe, and there is this one, and there are other cases under investigation. There are other cases where we have gotten identities but have not yet brought the cases," said the SEC's enforcement chief, Gary Lynch. "If you do it once and you can do it again . . . hopefully, it influences people who think they can trade abroad" and escape detection, he said.

The SEC has not been alone in trying to unlock bank secrecy abroad. The Treasury Department, interested in tax evasion, and the Justice Department, interested in money laundering and illegal drug traffic, also have poured considerable efforts into finding ways to obtain needed evidence.

"Any time we have to go outside the U.S., we have a problem," Lynch said. Several of the insider-trading cases brought by the SEC in recent years suggest that some of those accused by the agency of exploiting insider information have tried to use that problem to their benefit, attempting to pull the cloak of bank secrecy over their activities.

Many countries, including Switzerland, still have bank secrecy laws and laws and regulations that limit the ability of U.S. agencies to obtain evidence. According to a 1985 report by the Senate permanent subcommittee on investigations, 31 nations had such restrictions. Even so, the sort of secrecy once represented by the Swiss bank account has become a good deal less absolute -- as the SEC's allegations in the Levine case indicate.

The SEC said in documents filed last week that it had subpoenaed Levine in 1984 and been told by him that he controlled no stock trading accounts and had not been involved in a 1984 trade in Textron stock. He lied, according to the SEC, but it didn't end there.

By 1985, the agency's investigators were pursuing several transactions handled by Bank Leu, a Nassau subsidiary of a large Swiss bank.

On April 15 and 16 of this year, SEC attorney Peter Y. Sonnenthal interviewed an employe of the bank, who told of efforts beginning in September 1985 by a Mr. X, who had directed the trades, to hide his identity from the SEC. Then, about two weeks later, on May 10, legal representatives of the Bahamas bank revealed the identity of Mr. X: Dennis B. Levine, a managing director of Drexel Burnham Lambert Inc.

According to the SEC, the bank traded on Levine's behalf and at his direction in U.S. markets, keeping his profits in accounts that he maintained in the Bahamas under an alias and in the name of two Panamanian holding companies he controlled.

Trading in U.S. markets by foreign customers is nothing unusual. "Approximately 10 percent of the transactions on the New York Stock Exchange are now originated abroad," SEC Chairman John S. R. Shad told a Senate Appropriations Committee hearing last week.

Michael D. Mann, chief of the SEC's office of interational legal assistance, noted recently that foreign investors in U.S. stock markets traded stocks worth $123.7 billion in 1984, up sharply from the $75.4 billion volume in 1981.

If those trades include activities outlawed here, the SEC may go abroad looking for evidence. "The idea is that they've come into our jurisdiction and broken our laws. They've committed offenses against people trading in our markets with the expectation that the markets are fair and protected by our regulations," Mann said.

Concern about the misuse of foreign bank secrecy is increasing as stock markets have become increasingly international, too. Electronic trading links are being developed between stock markets here and in other countries, and U.S. stocks also are traded in foreign markets.

The SEC and other agencies have pursued several different courses to try to pierce bank secrecy. The U.S. government has negotiated three treaties that provide for more access to information by U.S. investigators, and "several negotiations with sensitive countries are pending," according to a State Department source. So delicate are the negotiations that federal officials will not disclose the identities of the countries with which treaties are in the works.

In 1982, the United States and Switzerland agreed to allow U.S. law enforcement authorities access to information about Swiss bank accounts in certain cases of insider trading in U.S. securities markets. That agreement allows information about individual investors and their accounts to be made available to SEC investigators in insider-trading cases unless a commission of inquiry established by the Swiss Bankers Association determines that the individual investors were not engaged in insider trading.

The State Department also has negotiated an agreement with Britain and the Cayman Islands, a British colony, that makes information related to narcotics cases more accessible to U.S. investigators, and a treaty with the Dutch government and the Netherlands Antilles that also makes financial information easier for U.S. investigators to acquire.

Short of treaties, other developments have helped pierce the veil of bank secrecy and blocking laws. For instance, when the SEC was investigating insider-trading abuses related to the unsuccessful bid made by Seagram Co. for St. Joe Minerals Corp., it persuaded a federal judge in New York to order a Swiss bank doing business in the United States to reveal the name of its client or face large fines.

In the case of alleged illegal dealing in Santa Fe International stock, Switzerland's highest court in 1984 ordered Swiss banks to turn over to the SEC the names of persons suspected of making those trades. A year later, the Swiss government agreed to turn over documents the SEC said it needed to prosecute eight investors who had profited from the takeover of Santa Fe by Kuwait in 1981.

The SEC also has been able to gain cooperation on a case-by-case basis from bank and government officials in regions with bank-secrecy safeguards.

Still another factor, according to SEC officials, has been its growing ability to work within restrictive laws to get the evidence investigators believe they need. "We're getting better through practice.