A former Kuwait Airways official testified in federal court in Washington yesterday that he undertook a "secret initiative" for the CIA in late 1983 to develop ties with moderates in the Iranian regime and, ultimately, to recruit spies for the CIA inside Iran.

The former official, Robert Mario Sensi, testified that he was contacted about the project by "top officials of the U.S. government" and was directed by a high-ranking CIA official. Sensi was asked several times to name the official, but he declined in each instance, saying that for national security reasons he would reveal the man's name only if a judge directed him to do so.

U.S. District Judge Oliver Gasch did not order Sensi to name the CIA official. Sources familiar with the case said Sensi was referring to the late director of central intelligence, William J. Casey.

Sensi, who was charged last year with using a secret bank account to allegedly steal nearly $2.5 million from the airline, has testified for the past two days in a civil case brought by the Kuwaiti government-owned airline against American Security Bank to recover the money. Sensi, who has not been tried on the criminal charges, testified for the bank yesterday, waiving his Fifth Amendment rights.

Attorneys for the airline attempted to block his testimony claiming it was designed to help him in his criminal case, but Gasch denied the request, saying that Sensi's testimony probably would hurt rather than help his defense.

The focus of the trial is the "640" account Sensi maintained at American Security in the name of Kuwait Airways, of which he served as Washington sales manager until last August when he was arrested in London. The "640" refers to the last three digits of the account's number.

But in giving his explanation of how the account was used, Sensi has woven a complicated tale involving the Kuwaiti royal family and its immense riches, secret dealings with Iranians, hijack negotiations, former Dallas Cowboys owner Clint Murchison and a coup in Liberia.

On the other hand, Kuwait Airways attorneys have portrayed Sensi as a high-living wheeler-dealer who liked to hobnob with Middle Eastern businessmen and U.S. politicians, and who milked the corporate account to finance his own repeated attempts to make it big in the international business community.

Sensi, 36, testified that for the first 3 1/2 years after he joined the airline in Washington in 1977, he was required to personally pay for expenses he incurred when accompanying members of the royal family.

Sensi said that former Kuwait ambassador Khalid Jaffar authorized him to open the account in late 1980 as a "mechanism" for reimbursing those expenses. He said that it was used primarily for this until 1983, when he said it started being used to finance covert operations.

Those operations and expenditures were approved by the Kuwaiti chief of civil aviations, Sheik Jaber Athby al-Sabah, who is also deputy chairman of the airline, Sensi said.

Sensi described his job here as being a "jack of all trades," and testified that it consisted of such things as making arrangements for royal visitors, accompanying them while in the United States, procuring prostitutes for visiting government ministers, getting some young royal students into U.S. colleges and, in one case, obtaining a fake degree from Purdue University for a Kuwaiti official.

After the CIA request to make inroads with Iranian moderates, Sensi testified that he and an Iranian exile, Habib Moallem, set up a Washington-based international trading firm to serve as a front company.

A bank attorney said Sensi eventually funneled nearly $1 million into the company, Aalamin Impex.

Sensi testified that he met with CIA officials from "70 to 80 times." Sources said Casey at one point directed Sensi to go to Tehran, and that Sensi had obtained a visa for the journey, but that the trip was called off.

Sensi's testimony is the first indication that the Kuwaiti government may have played a role in U.S. efforts to establish contacts with moderate Iranians. The alleged operation also appears to have come about a year before the acknowledged overtures to the Iranians by former national security adviser Robert McFarlane.

Few details of the operation were revealed by Sensi, but he said that the front company sought to gain trading contracts that would result in contacts inside Iran.

He characterized the result as being "many contacts that were beneficial to the United States."

Sensi also testified that he was involved in a second project with the CIA that was aimed at persuading the government of Sierra Leone to allow secret U.S. satellite-tracking stations to be placed there.

Sensi said he worked with Murchison, the late owner of the Cowboys, on the project that would have replaced tracking stations in Liberia that the United States feared would have to be abandoned as a result of Sgt. Samuel K. Doe's successful coup in 1980.