The Securities and Exchange Commission said yesterday that a group of foreign investors has agreed to surrender $7.8 million in allegedly fraudulent profits generated from trading in the stock of Santa Fe International Corp.

A court order entered yesterday in U.S. District Court in New York concludes the SEC's largest insider-trading case ever.

The culmination of the five-year-old Santa Fe case also marks a milestone in the SEC's efforts to pierce the secrecy of the Swiss banking system, according to Gary L. Lynch, the SEC's director of enforcement.

The investigation produced a new agreement with Swiss banking authorities.

The agreement enables the SEC, under certain circumstances, to gain access to information about depositors who are subjects of investigations.

"It dwarfs any other recovery" made by the SEC in an inside-trading case, said Lynch.

"Beyond that, it demonstrates that we're prepared to go after overseas trading," Lynch said.

In the Santa Fe case, the SEC charged that the foreign investors learned from a Santa Fe director that the company was conducting merger negotiations with Kuwait Petroleum Corp.

Prior to the announcement of the merger, the SEC contends, the defendants purchased stock and stock-option contracts in Santa Fe, a major California oil drilling contractor.

On Oct. 5, 1981, Santa Fe announced that its stock would be purchased by Kuwait Petroleum for $51 a share, more than twice the price of Santa Fe before the announcement.

For a total investment of $750,000, the defendants reaped a profit of approximately $6.2 million, the SEC alleged.

The court order contains a settlement between the SEC and four foreign investors: Costandi Nasser, a Lebanese businessman; Faisal Al Massoud al Fuhaid, a Kuwaiti businessman; Luay Tewfik al Swaidi, an Iraqi; and H. R. H. McCulloch, a former employe of one of Santa Fe's London-based subsidiaries. Two foreign organizations that invested in Santa Fe stock also were named in the settlement.

Without admitting or denying the SEC's allegations, the individuals and organizations agreed to repay the profit from the trading in Santa Fe stock.

The funds are to be supervised by court-appointed master, Buchbinder, Stein, Tunick & Platkin of New York. The firm will administer claims by investors who suffered losses by trading with the foreign investors.

The source of the inside information, the SEC charged, was Santa Fe director Darius N. Keaton, who allegedly passed the word to Nasser, a longtime business associate. Nasser allegedly shared the information with the other defendants, the SEC said.

Keaton agreed to a court order requiring him to surrender $300,000 in profits. He is now under federal indictment arising from the Santa Fe transactions.

When the SEC's case began, its investigators knew the identity of only one of the investors, who had traded through a U.S. broker.

The others had traded through Swiss banks, and that nation's rigid banking secrecy laws blocked the SEC from identifying them.

The U.S. Department of Justice, on behalf of the SEC, requested assistance from Swiss authorities in 1982.

After a lengthy judicial process involving the highest court in Switzerland and the nation's highest political body, the SEC was granted access to the information.

A byproduct of the investigation was a 1982 memorandum of understanding between the SEC and the Swiss Bankers Association, a powerful self-regulatory organization.

When an SEC investigation determines that insider trading may have occurred by investors using Swiss banks, it can provide that information to a commission of inquiry established by the Swiss Bankers Association.

The commission will determine who the individual investors are and whether the record shows they were not engaged in illegal insider trading.

Unless that negative finding is made, the identity of the individuals and the information about their stock transactions will be provided to the SEC.

The Swiss authorities also have the power to freeze the accounts of depositors to permit an eventual recovery of illegal profits.

Uncovering the identity of the Santa Fe investors took three years. Under the new agreement, inquiries take three or four months.

"We've used the process a number of times. We're pleased with the way it operates," said Michael D. Mann, chief of the SEC's office of international legal assistance.