This story is based on reporting from Tehran, Washington, Panama, Paris and Geneva.

One of the more curious episodes of recent diplomatic history began last Dec. 15, when Iranian Foreign Minister Sadegh Ghotbzadeh telephoned an old Parisian friend upon learning the deposed shah had left his Texas refuge for Panama.

That call began a series of complex, unorthodox and largely secret negotiations that ultimately became the focus of efforts in both the United States and Iran to free the 50 Americans held hostage in the U.S. Embassy in Tehran.

The scope of the negotiations was international, moving restlessly from Washington to Tehran, to Panama, Paris and Geneva. The participants were from the highest echelons of the two governments directly involved -- White House chief of staff Hamilton Jordan and high-level State Department officials, Iranian President Abol Hassan Bani-Sadr and Ghotbzadeh.

Yet despite the wealth and power of those governments, and the recognition of a crisis of global proportions, the central actors in the drama, the ones who carried the messages, who advised the two administrations, and the ones in whom both governments placed their trust, were a group of obscure foreigners and rank amateurs at diplomacy.

Until Ayatollah Ruhollah Khomeini publicly sided with the militant captors in Tehran two weeks ago and effectively ended their role, those amateur efforts perhaps came closer than any other attempts over these long months to free the hostages.

Both sides considered the fact that they are amateurs -- and not diplomats -- to be their strongest point.

The friend Ghotbzadeh telephoned was French attorney Christian Bourguet, whose credentials, along with his law partners Francois Cheron and Bertrand Vallettte, were impeccable as far as revolutionary Iran was concerned. For years during their long French exile, Bourguet had helped prevent the French government from giving in to the shah's pressures to deport Ghotbzadeh, Bani-Sadr and many other Iranian opposition militants.

At the same time, Ghotbzadeh remembered that earlier that fall Argentine politician Hector Villalon, also a Bourguet client and himself a political exile of sorts in Paris as a supporter of Argentina's late president Juan Peron, had negotiated a spot oil deal in Tehran for Panama.

Ghotbzadeh asked if they could get in touch with the Panamanians and inquire about the possible extradition of deposed shah Mohammad Reza Pahlavi to stand trial in Iran.

Within days, Bourguet flew to Panama, conferred with its strongman, Gen. Omar Torrijos, and reported back to Ghotbzadeh and Bani-Sadr. Bourguet later said that Panama suggested and the Iranians agreed that he should get in touch directly with the White House.

It was not the first the Carter administration had heard of the lawyers. Even earlier, Cheron had been approached as a possible intermediary by the United States through Italian politicians, but there had been no follow-up.

Villalon, a man who had been wheeling and dealing in Latin American, European and Middle Eastern political and financial circles for years, apparently impressed the White House with his wide connections.

By January, Bourguet had flown to Washington and met secretly for the first time with Jordan. By February, he had in hand a letter from Carter that amounted to "credentials" to serve as intermediary to Iran. Another of the group was eventually to receive a handwritten note from Carter asking him to dinner at the White House once the crisis was over.

"In the beginning," one of the lawyers said recently, "our own purpose was to give advice -- on what was happening in Iran, on how things could be done -- to give them a feeling of what was happening in Iran.

"After that, the American government asked us to tell certain things to the Iranians. We were never really diplomats," the lawyer maintained. "We didn't represent the Iranians" outside the Panamanian extradition effort.

"They didn't want anyone speaking in their name . . . It was just a chance to make some sort of communication," he said.

Thus, it was the lawyers who transmitted the messages allowing an agreement to be reached on temporarily scaling down U.S. demands from freeing the hostages outright to merely transferring them from their militant Islamic captors at the embassy to government authorities.

It was they who kept the ball rolling on the possibility of Panamanian extradition of the shah, a little understood but integral part of the deal that was ultimately to lead to the release of the hostages.

In Iranian eyes, the effort was designed to keep alive the possibility that the shah might be sent to stand trial in Tehran for his alleged crimes, even if there was little chance Panama actually would rule in favor of the extradition.

Under the complicated Panamanian procedure, Iran reasonably could argue indefinitely that such an outcome was still possible once the case was presented -- giving additional time to work out a deal on the hostages.

Time and time again, it was the lawyers who urged prudence and patience of both sides. They never abandoned hope, even when their initiatives began to show unmistakable signs of foundering.

The obvious question is why either side in the crisis took such a circuitous route toward negotiations with the other -- traveling back and forth to distant capitals, to meet with the lawyers, often traveling incognito, never admitting that such meetings actually took place. At the same time, why did they trust such rank amateurs?

At the time the lawyers' participation began, Iranians from Khomeini on down were loudly refusing any negotiations at all with the United States. In practice, if not proclaimed theory, that was also U.S. policy.

Both Bani-Sadr and Ghotbzadeh, although bitter personal rivals since the former had been replaced as foreign minister by the latter only two weeks before, wanted to solve the hostage crisis. Both men were convinced that the Iranian revolution would founder otherwise.

In Washington, officials who had exhausted more orthodox approaches were receptive. "We tried Yasser Arafat and the Palestine Liberation Organization, so why not consider these guys" a ranking member of the National Security Council said soon after Christmas.

Both the strength and weakness of the operation turned on the French lawyer's very anonymity. The closest they came to notoriety was Cheron's role representing the Iranian Central Bank and its legal efforts to unfreeze Iran's government assets deposited in French branches of U.S. banks.

Few outside of other French lawyers and human rights crusaders had ever heard of the small firm located on the Left Bank's quiet Avenue de l'Observatoire, near the Luxembourg Gardens.

Weeks of classic formal diplomatic representations, first with Bani-Sadr, then Ghotbzadeh, had been to no avail. No matter how suave and professional, U.S. diplomats arguing the case of their incarcerated colleagues simply struck an awkward note.The very fact that the French intermediaries were not diplomats was considered a major psychological plus by the Iranians.

The unorthodox approach through amateur diplomats also proved tempting to Hamilton Jordan, who took charge of the American end of the negotiations, upstaging the special State Department task force on Iran, headed by diplomat Henry Precht.

Thus, on both sides, proximity to power and rapport with it were preferred to more conventional diplomacy. Arguably, it helped prolong the negotiations far beyond the limits that more conventional diplomacy normally would have accepted.

Only toward the end did Bani-Sadr comment caustically that rival power centers -- his own phrase for the embassy miltants, their clerical right-wing backers and perhaps Khomeini himself -- had become an American as well as an Iranian phenomenon.

In hindsight, the whole effort to transfer control of the hostages was dogged with the bungling of others from the start.

As part of their negotiations, the United States and Iran had agreed in January on a United Nations commission to investigate the shah's alleged misdeeds and arrange for the hostage transfer. The whole operation was predicated on allowing Iran to claim a victory and forcing Washington into accepting the concept.

But instead, according to some, as a result of U.N. Secretary General Kurt Waldheim's misplaying of the sequence of events, the commission was seen as a U.S. victory that Iran had been forced reluctantly to accept.

The embassy militants and their clerical allies quickly seized the moment and, after bullying and embarrassing the commission for two weeks, finally refused to allow it even to visit the hostages.

The Panamanian government, put on the spot by Ghotbzadeh's triumphant claims that the shah had been placed under arrest while awaiting the extradition decision, hedged, giving right-wing militants in both Iran and the United States another excuse for intransigence.

As the initiative ran into increasing obstacles, the anonymity of the intermediaries began to run thin.

Nuri Albala, a French communist lawyer angered that his rival, latter-day Nuremberg war crimes tribunal plan against the shah had been dumped in favor of the more moderate approaches, leaked word in February that Ghotbzadeh had met with Jordan in Paris at Villalon's home.

No such meeting had ever taken place, largely because the intermediaries feared such a leak. But for the first time, a link had been established between Bourguet, Villalon and Jordan. As if a dam had cracked, stories of more and more contacts began to seep out.

In their more despondent moments, the intermediaries sometimes doubted whether their Iranian contacts had actually explained mistakes to Khomeini in detail. The final week before the shah's March 23 departure from Panama to Egypt gave Bani-Sadr's right-wing clerical rivals an easy task in persuading Khomeini not to approve transferring control of the hostages. The intermediaries privately came to suspect the good faith of both sides.

In the end, the initiative ended where it had begun -- facing the intransigence of Khomeini, who had been obliged to depart from oracular ambiguity to a hard line.

Obviously sobered, mentally, physically and emotionally exhausted by the ordeal, Bourguet last week refused to assign blame for their failure. "I think very much" about who was at fault, he said. "But I will make no statement before those 50 people are back in the United States."

While he said they were still in contact with the Iranians, and Bourguet at least has since traveled to Tehran, they have received no further substantive contact from the U.S. government, he said last week.

Although the naivete of the intermediaries served at least to destroy Khomeini's claims that Iran had refused to negotiate, the wiser go-betweens now are left to contemplate the difficulties of being disinterested amateurs, and the vanity of trying to succeed in the international big leagues.