Iranian President-elect Abol Hassan Bani-Sadr yesterday criticized the Islamic militants holding American hostages in the U.S. Embassy in Tehran, accusing them of trying to form a rival government that confuses official policymaking efforts.

Bani-Sadr, the finance minister who yesterday was officially declared winner of Iran's first presidential election, appeared to be maneuvering to isolate the radical captors who demand the return of the deposed shah before they will release hostages.

Canada, meanwhile, pulled its ambassador and embassy staff out of Tehran yesterday, the Reuter news agency reported from Ottawa. Canada's External Affairs minister said they would not return while the hostages were still being held at the U.S. Embassy in the Iranian capital.

[The government ordered the "temporary withdrawal" because normal embassy operations were impossible and Ottawa was concerned for the security of remaining staff, External Affairs Minister Flora MacDonald told reporters.]

[She stressed that Canada's action did not mean a break or suspension of relations with Iran and said relations would be maintained through the Iranian Embassy in Ottawa. An Iranian Embassy spokesman expressed surprise at the move and said, "We just can't understand this step. It doesn't make sense to us."]

In a series of interviews since Friday's election, Bani-Sadr, 47, has indicated in vague terms that ending the 12-week occupation of the embassy could be achieved short of returning deposed shah Mohammad Reza Pahlavi, who now lives in Panama.

In an interview published yesterday in the Paris daily Le Monde, he gave slightly more specific terms for releasing the hostages, saying the U.S. government must first acknowledge its "crimes" for supporting the shah and his imperial reign.

Bani-Sadr also called on the United States to approve of Iran's right to "begin proceedings against the shah and his friends" -- an apparent reference to some form of internatinal investigation of the shah's 25-year monarchy.

Although he said Moscow posed a greater immediate danger to Iran than the United States because Soviet troops in Afghanistan "are at our doors," Bani-Sadr called "unacceptable" the U.S. promise of military and economic aid once the hostages are released.

"Certainly we intend to resist Russian expansionism," he told Le Monde, "but we are not going to give that to the Americans as a pretext for retaking a foothold here. Washington will truly help us confront our neighbor to the north by declining to interfere in our affairs . . ."

Although he declined to be more specific, the French-trained economist called "blackmail" a compromise suggested by U.N. Secretary General Kurt Waldheim involving a U.N. sponsored investigation in exchange for the hostages.

Bani-Sadr said any new Iranian initiatives to solve the hostage crisis would first have to be cleared by the nation's revolutionary leader, Ayatollah Ruholla Khomeini, who is recovering from what his doctors call a minor heart ailment.

Khomeini, the 79-year-old spiritual and political leader, was reported yesterday to be in "completely satisfactory" condition. His doctors said he was moved from the intensive care unit of Tehran hospital to a general hospital ward.

Bani-Sadr served as foreign minister for a brief period after the hostages were taken Nov. 4, but was fired by Khomeini for expressing interest in some form of U.N.-sponsored forum to air Iran's grievances against the deposed shah.

Although the radical embassy occupiers continue to call for return of the shah, many observers believe official Iranian views have softened since Soviet troops invaded neighboring Afghanistan and regional and economic troubles beset the nation.

Bani-Sadr, who called the embassy takeover a misguided adventure soon after the hostage were seized, was the only presidential candidate to publicly criticize the militant captors and urge them to decide quickly what to do with them.

In a radio and television broadcast yesterday, the president-elect continued his attacks, saying it "is not acceptable" for the revolutionary youths, who say they are theology students, to operate as if they are a parallel government in Iran.

Bani-Sadr said in the broadcast that he agreed that everyone should have the right to express his or her views, provided that "functioning organizations" were able to carry out their duties to make policy and govern.

"But if in Iran we have two governments, for example one by the students . . . and the second one the [ruling] Revolutionary Concil, this condition is not acceptable," said the finance minister, who is a member of the council.

If the embassy captors were going to dictate the nation's policies, Bani-Sadr said, then Iran's government should be under their control. "But if it is supposed that there will be government," he added, "its decisions must be carried out."

In response, the embassy militants issued a statement saying they approved of Bani-Sadr's election as the popular choice for president. But they rejected his view that they are trying to from a rival government.

"One of the characteristics of the revolution," a spokesman said, "is that all decisions should not necessarily be made through government channels. We don't agree with two governments, but the existence of one government does not mean that others have no rights to express their opinions."

Although the confrontation between Bani-Sadr and the embassy captors may set the stage for a fight over the hostage issue, it was touched off by a statement the occupiers made last week condemning Iran's decision to attend the conference of Islamic foreign ministers in Islamabad, Pakistan.