A federal judge here held yesterday that Iran is liable for damages to American companies whose assets were seized last summer when the revolutionary government there took control of all foreign-owned interests.

U.S. District Court Judge George L. Hart Jr. made the decision despite expressions of concern by Justice Department lawyers that any rulings in legal cases involving Iran could jeopardize efforts by the Carter administration tonegotiate the release of the American hostages in Iran.

However, Hart that the government should have backed up that argument in court with testimony from a State Department high official familiar with the hostage crisis.

Legal observers described Hart's ruling as unprecedented in that it states that American courts can decide how much money a foreign country owes for its nationalization of assets owned by Americans.

Hart acted in the case of a group of insurance companies claiming Iran owes them $35 million in compensation for the takeover of a financial interest there in June 1979 after the downfall of the shah.

In an eight-page decision, Hart said that Iran's failure to pay promptly and adequately for the losses violates a 1955 treaty on economic relations between the United States and Iran and violates international law. Hart concluded that the American companies had no alternative but to go to the courts to seek compensation.

In all, claims for more than $5 billion in at least 218 civil suits have been filed in U.S. courts against Iran. Hart's decision was the first substantive ruling in those cases since the hostages were seized last November. The Carter administration has asked the courts to remain neutral for the time being.

Last Nov. 14, 10 days after the hostages were taken, President Carter ordered the freezing of Iranian assets held in American banks. The lawsuits filed essentially represent the lining up in the courts by private interests for what they claim is their share of the $8 billion that was frozen.

The insurance firms involved in yesterday's ruling are American International Group Inc., the Continental Corp. and INA Corp.

It was unclear what effect Hart's decision would have on other claims. Attorneys for Iran said yesterday that they will appeal his decision to the U.S. Court of Appeals for the District of Columbia.

The Iranian government nationalized all 12 insurance companies operating in that country on June 25, 1979. At the time, no mention was made of compensation to foreign owners.

About two weeks earlier, the government took control of the country's banks but assured that compensation would be made. In early July 1979 virtually all private, large-scale industry was nationalized, again with no mention of compensation. Interests held by American companies were involved in all three actions.

In his ruling, Hart wrote that "it is absolutely clear that the Republic of Iran has shown a complete and utter disregard for international law by its seizure and holding of diplomatic hostages for a period exceeding eight months and its disdain of all diplomatic and international efforts to obtain their release."

During the hearing before Hart yesterday, John D. Aldock, an attorney representing Iran, told Hart that Iranian officials began work last summer trying to determine how much American companies were owed in compensation for nationalization of their assets.

Aldock contended that international law provides that disputes in such cases be handled through diplomatic channels or through the international court of justice.

"I find it very strange that this defendant would come in and talk about the international court of justice," Hart said.