When QuesTech Inc. signed a contract with the shah of Iran's government in May 1977, the McLean-based company looked forward to a very profitable three years providing professional services to the Iranian air force.

Instead, QuesTech's hopes tumbled with the shah's rule in 1979, dragging the small company into the tangled wreckage of U.S. diplomatic and financial relations with Iran.

After Moslem fundamentalists forced the shah to flee Iran, QuesTech and about 400 other U.S. companies and individuals sued the new Islamic Republic of Iran for broken contracts, payments owed and expropriated property ranging from cars and refrigerators to drilling equipment. But they worried about ever collecting as U.S.-Iranian relations worsened, hitting their nadir with the Iranian seizure of 52 American hostages in November 1979.

The professional and engineering services firm finally resolved its dispute with Iran last week, collecting a $1.47 million settlement through an international arbitration panel that has worked quietly to clean up the broken promises of U.S.-Iranian relations long after the hostages won their freedom.

QuesTech is one of about 130 U.S. companies that have won a total of roughly $370 million from Iran through the Iran-United States Claims Tribunal, which was created in 1981 as part of the Algiers agreement that won freedom for the hostages. The nine-member panel -- which sits at The Hague but is not part of the World Court -- was established to arbitrate disputes between the two countries after Iran released the hostages and the United States released about $12 billion in Iranian assets that had been frozen in U.S. banks.

Three U.S. judges, three Iranian judges and three judges from neutral countries hear and rule on complaints by both sides. About 86 percent of the 3,850 claims filed with the tribunal are private claims by individuals or companies against the government of the other country -- the overwhelming majority of which are by Americans against Iran. The rest of the claims involve disputes between the two governments, between banks of the two countries, or over the interpretation and application of the Algiers agreement, according to the State Department's office of international claims and investment disputes.

The primary reason both sides abide by the tribunal is financial: They are seeking billions of dollars in reparations.

Awards against Iran are paid out of a $1 billion security fund created when the rest of Iran's assets were freed. The fund now holds more than $1 billion, because interest on the money has exceeded the amount of the awards paid out. The fund is held by a bank in the Netherlands in an account administered by the Algerian government. As long as Iran cooperates, it can expect to keep whatever is left after all the disputes are settled.

Meanwhile, Iran is seeking tens of billions of dollars from the U.S. government, for reasons ranging from disrupted contracts to U.S. support for the shah. The U.S. government has paid Iran two awards, totaling about $8.1 million.

Iran also knows it must cooperate if it is to regain access to western markets, technology and capital, said a State Department officer familiar with the tribunal.

At the time of the Iranian revolution, QuesTech had completed half of its three-year commitment to help train Iranians to run electronic border protection systems. QuesTech later sought $2.1 million in damages from the new government for unpaid invoices, the costs of terminating the contract, the release of a performance bond, interest, the costs of litigation and loss of profits. The tribunal awarded QuesTech the full amount of its claims except for the alleged loss of profits and granted only a fraction of the legal expenses sought.

"It was a ludicrously low amount for legal expenses," said Herbert W. Klotz, chairman of QuesTech, noting that the company's burdens included translating all court documents into Farsi and flying witnesses, executives and lawyers to the Hague. "Sure, we'd like to get everything we asked for, but we're pleased under the circumstances."

R. J. Reynolds Industries Inc., the tobacco company, has received the largest amount to date through the tribunal -- $62.2 million, primarily for nonpayment of cigarette deliveries. Other big winners so far include E. I. du Pont de Nemours & Co., which won an award of $42.7 million; General Motors Corp., which won $20 million; and Xerox Corp., which won $12 million.

Most of the private claims, almost 2,800, seek amounts of less than $250,000 and were filed by U.S citizens, companies and institutions that lost personal possessions, equipment, money and other assets because of the Iranian revolution. About 100 of these have been withdrawn or resolved, and the rest are on hold while the U.S. government seeks to win a lump sum that could be disbursed among the claimants. But the tribunal has resolved 191, or 37 percent, of the private claims filed by companies and individuals for amounts greater than $250,000.

The State Department said that is a remarkably good record compared with the results of other agencies created to resolve legal and financial disputes following international conflicts.

Parties that filed claims after World War II, after the Chinese revolution and after the Vietnam war have waited decades to win judgments, and often have had difficulty collecting their awards.

For example, a Delaware company waited 29 years to settle its claim against the People's Republic of China for a power plant expropriated in 1950, after the Chinese revolution. The U.S. Justice Department ruled in 1972 that the company was owed $144 million. But the company collected only $20 million in 1979, after the United States normalized relations with China.

By contrast, QuesTech filed its claim with the tribunal in February 1981 and collected the full amount awarded less than five years later.

The tribunal also has weathered stormy, even violent, disagreements among the parties involved. Last year, two Iranian judges physically assaulted and verbally threatened a 69-year-old Swedish judge, Nils Mangard, accusing him of bias in favor of U.S. interests. Mangard's vote had enabled R. J. Reynolds to win its huge award two months before the attack.

State Department sources attributed the attack to internal Iranian politics, speculating that the Iranian judges may have been trying to please domestic factions virulently opposed to the tribunal.

Since then, the Iranian judges have been replaced with two others, described by the State Department as "very professional." Mangard has retired. As of last spring, all three of the original neutral judges, including Mangard, had resigned and been replaced.

The tribunal also has continued its work despite complaints by some U.S. companies over how it is financed. The U.S. Treasury Department took 2 percent of each award to cover part of the government's costs, until Sperry Corp. successfully challenged the practice in U.S. Claims Court. In May, a claims court judge ruled the practice invalid, finding that the government did not follow the proper procedures for assessing such a fee.

In August, the president signed into law a bill allowing the government to keep 1.5 percent of all the tribunal's awards up to $5 million, and 1 percent of all amounts over $5 million -- including those awarded before the bill was enacted. The government has collected $7.3 million, and is in the process of refunding $2.6 million to about 128 companies, said Michael P. Mealey, publisher of Mealey's Litigation Report: Iranian Claims, a bimonthly publication that tracks the work of the tribunal. The government is returning $14,000 of the $56,000 it skimmed from Sperry's $2.8 million award, a Treasury Department official said. Sperry has challenged the new law as unconstitutional, the State Department said. Sperry would not comment.

The State Department notes that the $4.6 million the government has been authorized to keep is less than one-third of the more than $13 million it has spent to support the tribunal and its work.

QuesTech, which had 1.5 percent, or about $22,000, taken by the Treasury, has "no complaint about it," Klotz said. "It's not all that much. . . . They have to be compensated somehow -- it's not the U.S. government's fault Iran did what it did."