On Aug. 28, 1976, three American employees of Rockwell International Corp. were shot to death in Tehran, the capital of Iran.

Richard M. Helms, who was then the American ambassador to Iran and who formerly was director of the Central Intelligence Agency, described the killings in a private conversation with another American three days later:

"A red VW pulled into the front of the car (carrying the Rockwell employees) and a minibus rammed from the rear. Three or four men came over the wall; one went to the front and told the driver to lie down. The driver put his head up and was told to lie down again. Then the man fired through the front, killing Cottrell (one of the employees), who fell out of the car on the ground and moved his hand. One of the men came and fired point-blank into his face.

"After shooting the two in the back seat through the rear window somebody reached in with a pistol and shot each of them in the face. All three had powder burns in the face.

"One of the pistols was a stolen pistol from the United States Military Assistance Advisory Group (MAAG), the other one was believed, from the cartridge cases, to be a Browning. The people were armed with Polish submachine guns. Therere were about 43 rounds of expended ammunition on the ground. They escaped in a third car. The job was professional with the same modus operadi as in the past."

The newspapers reported the official explanation: the killings were the work of Islamic Moslem terrorists.

But three days later the shah of Iran was telling a different story to an American who visited him at 11 a.m. for a 45-minute audience at his lavish summer palace.

"The Russians," the shah told his visitor, "were behind this incident as well as (a) previous military one."

Two hours later Helms told the same American he agreed with the shah.

The three victims of the terrorist attack were working on a secret project of truly Buck Rogers proportions called IBEX. The name was mentioned in the news and then faded.

IBEX.

It is a code name for a $500 million surveillance system for the borders of Iran.

But it is also a symbol of the dangers and problems and corruptions that have afflicted the U.S. arms sale program in Iran and other parts of the world.

IBEX was begun two years ago - an attempt to apply the very best of American technology to the shah's desire to gather intelligence about his neighbors through electronic and photographic surveillance.

On the face of it, it could have been a straightforward business deal between Rockwell and the shah. But as the plans have evlved, the plot has thickened and become perhaps hopelessly tangled:

Item: Rockwell agrees to pay a secret agent's fee of $4.5 million to a mail drop on Bermuda - Post Office Box 1179, Reid House.

Item: Some payments to the mail drop are forwarded to a Mr. Tureettini, Chase Manhattan Bank, 63 Rue de Rhone, Geneva, Switzerland.

Item: The goverment of Iran deposits $5 million in the Riggs Natioinal Bank in Washington for "payment on demand by signature of Mr. William Owens and Mr. Henry Plastee." Owens and Plastee work for the CIA.

Item: Donald Patterson, a former CIA employee, is paid $55,000 to authorize payments of $1.1 million to an auditing firm, Touche Ross and Co. This in turn trigger payments to U.S. defense contractors from another $47 million deposited at the Riggs bank by Iran.

Item: Helms sends a handwritten note to CIA Director George Bush requesting that a top CIA official come to Iran to hear a series of allegations about corrupt practices.

Item: Fifteen CIA employees in Iran, operating under cover as the United States Advisory Team (USAT), draw up and expand plans for the sophisticated and automated intelligence-gathering system.

These are all elements in the IBEX story. The arrangements are not unique. The Defense Department knows the multibillion-dollar U.S. military equipment sales program in Iran is widly out of control. The CIA knows. The Iranians, from the shah on down, know.

They all condemn it. They issue directives and commands to stop it, to slow it down, to bring some order to it. But the practices persist.

Documents recently obtained by The Washington Post spell this out in detail. They include secret agreements for previously undisclosed agents' fees, secret messages to the Pentagon from the shah, official laments, complaints and allegations. The documents include dozens of memos reporting on the private conversations of the shah, his top generals and Ambassador Helms.

U.S. arms merchandising in Iran - about $10.4 billion in the last five years - has been the subject of severe public criticism. But these documents show it is in much worse shape than publicly reported.

The IBEX project is a case study in the kind of intrigue and under-the-table dealing which, on more than one occasion, have characterized the U.S. arms merchandising program. The story begins in early 1974.

By that time the shah had determined that he wanted electronic eyes and ears around his borders. He was influenced, in part, by the example of the CIA, which for many years had operated two secret monitoring posts along the 1,250-mile border between Iran and the Soviet Union.

So he asked the CIA for assistance. A general plan was drawn up calling airborne units and several mobile ground units. Robert B. Phillips of the CIA was sent to Iran to set up an advisory team for the project. Bids were invited, and four U.S. companies entered into the competition - Rockwell International, GTE Sylvania, E-Systems and Mechanics Research, Inc.

The companies were all warned by Phillips on Nov. 19, 1974, that the use of Iranian "middlemen," meaning influence peddlers, would not be tolerated.

"It is quite clear." Phillips wrote to the contractors, "from the many pronouncements of Gen. Toufanian that use of local agents on Iranian government contracts is absolutely forbidden . . . any contractors discovered using local agents on the IBEX program will be barred from participation."

The Gen. Toufanian he referred to is Air Force Gen. Hassan Toufanian, the vice minister of war in Iran and the shah's point man in all weapons procurements.

The competition for the IBEX contract, by all accounts, was very keen. Perhaps for that reason, Rockwell International ignored the unequivocal warning it had received from Phillips. On Jan. 1, 1975, Rockwell signed a secret agents contract with Universal Aero Services Co., Ltd., known by its acronym UASCO. Its business address was Post Office Box 1179 at Reid House on Bermuda.

The contract stipulated that an agent's fee, ranging from 5 to 10 per cent of sales, would be paid by Rockwell to UASCO for promotion of an "electronic surveillance and countermeasures program for th borders of Iran."

One of the people connected with UASCO was a wealthy Iranian named Abolfath Mahvi. He was th "middleman" who apparently persuaded Rockwell that he could provide the necessary marketing services to win the contract.

As it turned out, Rockwell did win the IBEX contract on Feb. 17, 1975, apparently on the recommendation of the CIA team in Iran. The initial phase of the contract involved $31 million.

By July, 1975, Mahvi's role as the agent in the IBEX project became known to Gen. Toufanian, who wrote an angry letter "to whom it may concern."

It said, in part: "I am authorized to state that, due to the interference of Mr. Abolfath Mahvi in the procurement of defense systems and requirements for the Imperial Armed Forces from United States industries, his name should be put on the blacklist."

That message obviously got to Rockwell. On Sept. 30, 1975, a letter terminating the UASCO agreement was sent to the Bermuda Post Office box by a Rockwell vice president, James C. Cozad.

The trouble was that the original agreement specified that it was "not subject to termination" for five years. So two weeks after the "termination," one of Cozad's assistants informed him tha Rockwell owed $4,526,758 on the agent's fee.

Cozad, who is living in California, refuses to talk about the matter. That is also the corporate posture of Rockwell, whose spokesman, Earl Blount, said there would be no comment from the company.

The episode with UASCO and the forbidden agent's fee is merely one of the strange money transactions surrounding the IBEX deal.

Others involve the Riggs National Bank and the CIA.

It has become a standard practice on "covert" projects, such as IBEX, to hide or insulate some of teh payments that go out to U.S. contractors. This is done in the interests of secrecy.

In the case of IBEX, letters of credit of more than $47 million were sent to Riggs by the Iranian government. Checks to contractors on the project were drawn following a series of complicated transactions involving the CIA and the Touche Ross Washington office.

Touche Ross is paid $1.1 million for its services, which are baasically to follow CIA instructions in authorizing contractor payments.

A former CIA employee, Donald Patterson, got a $55,000 commission on the Touche Ross contract, which relieves the firm of "liability for any fraud, collusion, illegalities and malfeasance."

Why the ontract was written that way, why Patterson got a commission and why the payments to IBEX contractors follow this circuitous path are unknown. Riggs, Touche Ross and the CIA won't discuss the matter.

But documents show that the system has produced checks of $1.2 million for Hewlett-Packard and $23 million for Watkins-Johnson. They are both subcontractors for the IBEX project.

While the payment system seems to work, doubts about IBEX have been growing ever since the project began. There was first the matter of the improper agent's fee negotiated by Rockwell with UASCO.

Problems of greater magnitude have since surfaced.

They involve allegations of widespread corruption in the project and grave doubts that the IBEV system is necessary or will ever work.

Ambassador Helms capsulized the situation during July, 1976, in a handwriting note to CIA Director George Bush. A memo of a conversation between Helms and an American visitor in Tehran records Helms' attitude:

"Ambassador interrupted to say he had completely washed his hands of IBEX. He had called a very senior CIA man from Washington to come check on it. He had him sit down and take notes of all charges and allegations he had heard. He then told this man he was totally washing his hands of the reponsibiltiy. It would all rest on CIA - if it failed it was going to blow up on them. They could do what they wished."

One of the concerns has to do with the feasibility of IBEX. Coul dit prove to be a $500 million dud?

Documents from th eIBEX file raise the possibility. It is alleged, for example, that Iran is being used as a technological dumping ground for equipment and concepts that the National Security Agency and other U.S. intelligence agencies have found impractical and overly sophisticated.

The IBEX system, for example, envisions the use of long-range cameras to be installed in airborne surveillance units. They are triggered to take pictures in response to intercepted communications and radar signals. But they cannot work at night or in cloud. Thus, one Pentagon official familiar with the system calls it "garbage."

Moreover, the heart of IBEX is an extremely expensive and automated computer network which the United States has previously found unworkable.

So the ultimate value of IBEX is unproven, at best.

These difficulties and problems of corruption, waste and obsolescence in other U.S. projects in Iran have become a matter of serious concern and irritation to the shah.

He has been protesting for months to U.S. authorities and at the same time has become suspicious of many of the Americans involved in his comtry's massive arms buildup. On fFeb. 22, 1976, he ordered Gen. Toufanian to send a six-page letter of complaints to Secretary of Defense Donal H. Rumsfeld. He was so suspicious of leaks from the Americans that he had the document sent by way of a U.S. diplomatic pouch.

In it, the shah charged top Pentagon officials in the arms sale program with "malfeasance" and "crude deceptions" in hiding deficiencies in radars that Westinghouse was trying to sell Iran.

By September, 1976, the shah was telling visitors that his disenchantment with American officials, Rumsfeld in particular, was virtually complete.

According to a memorandum of conversation with the shah on Sept. 1, the Iranian leader charged that "the chicanery of Pentagon officials and their military and civilian representatives here were intolerable. Patience was unavoidable until the election, but not necessarily longer than that."

Months ago the shah cut off meaningful relations with top Pentagon representatives in Iran, and in one case asked that the senior U.S. representative in his country, Eric Von Marbod, be fired.

His dissatisfaction with Von Marbod and his other complaints are detailed in memos of conversations prepared by Richard Hallock, who was sent to Iran in 1973 by then Defense Secretary James R. Schlesinger. His mis- sioin was to look into the arms sale program.

He has since become a figure of some interest, as a Senate subcommittee reported last August:

"It was apparently Schlesinger's hope that Hallock's advice to teh shah might serve as a counterweight to the hard sales tactics of industry and, on occasion, the (U.S. military) services.

"Hallock operated outside of the Department of Defense chain of command, in part because he and the seretary suspected that some DOD components may be functioning primarily as salesmen rather than advisers.

"Hallock established a close relation with the shah, Gen. Toufanian, senior U.S. embassy officials . . . The government of Iran apparently developed a high sense of confidence in Hallock's advice, while Hallock simultaneously provided Schlesinger with reports."

By September, 1975 - just two months before Schlesinger was fired by President Ford - Hallock voluntarily withdrew as Schlesinger's representative in Iran. He and his small California consulting company, Intrec, were then retained under a multimillion-dollar contract to advise Iran on U.S. arms purchases.

In the memorandums Hallock has prepared on his conversations he outlines Iranian unhappiness iwth Americans and with Von Marbod ion particular.

According to one memorandum, Gen. Toufanian said at a Feb. 14 meet-

"Mr. Von Marbod, the U.S. defense representative, was in his view most certainly representing Northrop, E-Systems and Teledyne-Ryan at a minimum."

These are U.S. defense contractors. In one example, Toufanian complained that Von Marbod tried to help Northrop after Iran discovered that Northrop had paid an illegal $2.5 million agent's fee on the sale of F-5 aircraft.

Northrop had denied making any such payments, and Von Marbod tried to arrange a meeting with Northrop officials and Toufanian in New York to settle the dispute quietly.

Outraged at this action, Toufanian asked Hallock to go to Martin R. Hoffmann, the former Defense Department general counsel and now Secretary of the Army, and ask that Von Marbod be removed.

A spokesman for Hoffmann confirmed last week that Hallock ahd forwarded Toufanian's request to him.

Hoffmann did not report this to Rumsfeld because he felt TOufanian's request should have been forwardee through regular channels, according to the spokesman.

The memo of conversation on the Feb. 14 discussion continues and says that Toufanian "had recently taken this up with his imperial majesty (the shah) and that the decision and order had been that no one was to receive any consideration or staff and that all such relations with him had been quietly severed."

Earlier in 1975 Von Marbod had been formally reprimanded by Schlesinger for accepting hospitality at Northrop's hunting lodge in easton, Md. And early in his tenure Rumsfeld wanted to remove him, but was talked out of it by other Pentagon officials. Despite this Von Marbod has been kept in Iran and is scheduled to become the deputy to the unit in the Pentagon which oversees all U.S. arms sales, the Defense Security Assistance Agency.

Toufanian's assessment of Rumsfeld is contained in an Aug. 1 memo:

"Toufanian asked what kind of man was present Secretary of Defense and then answered his own question by saying that it was his impression that he was political, forceful, shallow, immature, inexperience in the defense matters of his job."

Ambassador Helms gave his own assessment at an Aug. 18 lunch with Hallock, according to another memo. Helms reportedly said, "Nothing good would happen in the U.S. government until the end of the election. He had never seen such a week government and so many people out of control in the Pentagon."

Ten days later the three American employees of Rockwell were killed, and Helms and the shah and the IBEX program had still another problem.