European Common Market foreign ministers agreed yesterday to drop economic sanctions against Iran and resume normal trade relations but analysts were pessimistic that the war-torn country could return anytime soon to an important position in world commerce.

World leaders largely expressed their relief anew yesterday, after the American hostages finally gained their freedom following a harrowing overnight delay, but at least two countries used the occasion to scold the United States.

In Cuba, the government-owned news aency, Prensa Latina, called the hostage episode a "great victory" for the Iranian people, Reuter reported. The taking of the American hostages, Prensa Latina said, was "the explosion of indignation of a people whose patience was tried for decades by crimes and pillage in which the United States was not only the protecter and supporter of the guilty regime, but its principal beneficiary."

Iraqi Foreign Minister Saadoun Hammadi was quoted by the official United Arab Emirates news agency as saying that the release of the hostages would have no effect on the war between Iraq and Iran but he warned the United States that his country will adopt a "specific" stand if Washington now decides to supply Iran with weapons. He did not elaborate.

As soon as it was known that the hostages had left Iran, the European Common Market foreign ministers issued a statement declaring that the eight-month-old sanctions imposed at the request of the United States were no longer necessary and each member country was free to drop them.

Officials in Brussels said that a ban on arms sales to Iran would continue to preserve the market's neutrality in the Persian Gulf War.

In Tokyo, Foreign Minister Masayoshi Ito said Japan must move "urgently" to dismantle the restrictions on Iranian imports and exports imposed last summer, Washington Post correspondent William Chapman reported.

The release of the hostages came as a great relief to Japan because the crisis had virtually demolished relations with one of that country's principal oil suppliers.

Japan's trading companies, which contract for most of Iran's oil imports, do not expect a quick resumption to anywhere near previous levels because of the war.

"I personally doubt that there will be an [Iranian] oil bought until the war is over," said one official of the trading arm of the Mitsubishi corporate group. Despite international reports that Iran has resumed substantial oil exports, the company said none of them are headed for Japan. No Japanese tankers are near Iran's damaged ports, he said.

A Japanese Foreign Ministry source said there is some concern that a resumption of trade with Iran might displease Iraq and that the government is informing Iraq that renewal of trade with Iran does not mean Japan intends to take sides in the war.

Elsewhere, Canada, which helped six American diplomats to secretly slip out of Iran a year ago, welcomed the release of the hostages. Foreign Minister Mark MacGuigan said Canada would make preparations to reopen its embassy, which it closed as a precautionary measure after assisting the six Americans.

British Prime Minister Margaret Thatcher said she hoped the release of the Americans "will augur well for the release of our own people" -- three missionaries and a businessman detained since last summer on accusations of spying but never formally changed or tried.