A retired Israeli general and four other men appeared before a special magistrate in Manhattan yesterday on charges that they participated in an illegal scheme to smuggle $2.5 billion in American-made warplanes, missiles and other weapons to Iran.

The men, in custody pending bail hearings starting today, were extradited to New York Wednesday from Bermuda. That extradition was the result of a ruling by the Bermudan Supreme Court and was the latest development in the largest "sting" operation ever run by the U.S. Customs Service.

The alleged scheme, which involved 17 defendants and five weapons-smuggling conspiracies, included smugglers and shipping agents from Israel, West Germany, France, Britain, Greece and the United States. The five extradited Wednesday had been imprisoned in Bermuda since April. Five men were arrested earlier in New York and the other seven are fugitives.

The "bait" in the operation, according to federal sources, was Cyrus Hashemi, a wealthy Iranian banker who appears on the Customs Service's 10 most wanted list of international arms smugglers. Hashemi posed as a buyer for Iran in the sting operation.

Sources said the operation started late last year when Hashemi, under indictment in New York on a 1984 charge of smuggling weapons to Iran during the U.S. hostage crisis, went to U.S. Attorney Rudolph W. Giuliani in New York and "said, 'Let's make a deal.'"

Giuliani, who is handling the case, refused to discuss what arrangement was made with Hashemi and said the charges against him remain active. William Wachtel, Hashemi's attorney, said of the arrangement, "At the end of the day, [Hashemi] hopefully will be treated fairly. But there are no promises. Fairness is in the eyes of the U.S. attorney."

Hashemi said in a written statement that he became involved in the case after being "approached by a representative of persons interested in selling arms to Iran."

Federal sources have identified that representative as Samuel Evans, an American lawyer based in London with New York offices on Madison Avenue. Evans, who was among those extradited Wednesday, is named as a participant in all five conspiracies, according to court documents.

Federal sources say that Hashemi, accompanied by undercover agents from the Customs Service, set up the deals in meetings in European cities.

The two Israel-based schemes have received the most attention because of the close Israeli-U.S. ties and the belief of many law enforcement officials that such large arms sales would have required Israeli government approval. The federal charges do not indicate the origin of the arms in the remaining three conspiracies.

Any resale by Israel of an American-made weapon or any weapon with American-made components would require State Department approval. Since the 1979-81 hostage crisis, the United States has banned arms exports to Iran.

In one of the alleged conspiracies, Israel Eisenberg and his son Guri Eisenberg, identified by U.S. sources as having strong links to the Israeli weapons industry, produced a list for Hashemi of $800 million worth of weapons, including jet fighters and a large collection of missiles, which they claimed could be produced from the Israeli Defense Ministry.

Federal law enforcement sources said they were concerned about the possibility that the dealers, including the Eisenbergs, could be involved in a "rip-off" and went to great lengths to be sure they could deliver the promised weapons.

A second Israeli-based deal for $343 million in weapons was allegedly put together by retired Brig. Gen. Avraham Bar-Am, a 30-year veteran of the Israeli army who is known as a hero of the 1967 and 1973 wars. His partner allegedly was William Northrop, an American based in Tel Aviv.

Five defendants were arrested April 22 in New York when they arrived to complete their alleged deals.

Federal law enforcement sources said the Israelis involved in the case had refused to come to New York because of warnings from "superiors" that they would be arrested.

Dennis Fagan, who heads the Customs office in New York, said that agents persuaded the group to meet in Bermuda as a compromise after they refused to come to the United States. "They wanted to do it in Israel. We said we weren't available. We picked a neutral site in Bermuda as a compromise. We paid for their tickets to Bermuda and booked hotel rooms for them as a gesture of good will," he said.

Meanwhile, Giuliani had spoken to Bermudan authorities and persuaded them to declare the men -- Bar-Am, Northrop, Evans and the Eisenbergs -- "undesirables" when their plane landed in Bermuda April 22. The suspects were then given the choice of reboarding the plane, for Baltimore, or being arrested in Bermuda as illegal aliens.

Bar-Am has asserted that he was operating with his government's knowledge and threatened to cooperate with U.S. authorities unless Israel intercedes on his behalf. Israel has denied knowledge of the activities of Bar-Am or the Eisenbergs.

Israeli Defense Minister Yitzhak Rabin, in a visit to Washington recently, said Bar-Am had "no authority to negotiate any deal." Calling Hashemi "an Iranian kook," he said he thought the Israeli defendants were involved in a scam to collect a $50 million advance payment from the Iranians and run.

"No one accuses, no one claims, that even one bullet was sold to Iran . . . . The accusation was conspiracy," Rabin said, adding that the ability of the alleged conspirators to deliver weapons to Iran "is the equivalent of my ability to sell you the Empire State Building."

Federal sources said U.S. and foreign intelligence communities think there has been a continuing flow of arms from Israel to Iran during its six-year-old war with Iraq.

Israeli officials said several years ago that in 1980 they sold Iran about $12 million worth of American-made military spare parts, including tires for F4 Phantom warplanes purchased under the shah's government. When the State Department objected, Israel said, the sales were stopped.