The Reagan administration ruled yesterday that nine countries--most of them European--have subsidized their steel exports illegally. The ruling was a long-awaited action that sharply escalates what has become the most serious trade crisis in the postwar period.

The decision will impose duties on the prices of imported steel from the nine countries, cutting shipments severely in some cases, steel officials said, adding to the unemployment and economic distress in Europe.

Even before the administration decision was announced, a high-ranking European Economic Community (EEC) official raised the threat of reprisals. The United States and its European trading partners "are entering a very difficult period," and EEC officials in two weeks will discuss what to do about "American exports which benefit from subsidies," the official said.

Anticipation of the decision in the government's most massive and complex trade case ever has raised tension across the Atlantic for months and was a bitterly discussed subject at the Versailles economic summit last week.

The Reagan administration's attempts to resolve the dispute in 11th-hour discussions with industry executives and European officials were unsuccessful, but Commerce Secretary Malcolm Baldrige said the effort to find a compromise will continue.

"I regret it has become necessary for the U.S. government to take the steps announced today, but remind all that these cases were provoked by the combination of the 1981 surge in exports to the United States and continuing and in some cases growing government financial support," Baldrige said yesterday. "I extend my sympathies to those hurt by our necessary enforcement of U.S. law" and an international code on subsidies.

A high-ranking EEC official this month predicted that a decision restricting steel imports could further exacerbate Europe's economic problems and lead to rioting by thousands of that continent's unemployed.

The preliminary finding said the nine countries illegally subsidized their steel companies to sell goods in the United States through unfair government loans, regional development grants, new capital, cash payments and failure to collect loans. The countries involved are West Germany, Britain, France, Belgium, Italy, the Netherlands, Luxembourg, South Africa and Brazil.

The finding requires that steel importers post with U.S. Customs officials cash or bonds--as high as $250 a ton--equal to the estimated subsidy until the Commerce Department makes a final decision in August. Department officials acknowledged at a news conference that their actions would "chill" shipments of foreign steel and effect the foreign trading system.

Some Wall Street analysts predicted that the financially ailing British Steel Corp., which was found to have the highest government subsidy of 40.4 percent, may drop out of the U.S. market on many steel products. Britain's market share could be taken over by many German firms who were found to have the lowest or no subsidies at all.

The American Institute for Imported Steel, Inc., predicted that the action will effectively shut out many imported steel products, leading to price increases of domestic goods and a cost of more than $5 billion annually to consumers.

The Commerce Department said its action involves 3.9 million tons of 1981 steel imports valued at $1.4 billion. That consists of about 20 percent of U.S. steel imports and about 4 percent of U.S. steel consumption, Commerce said.

Commerce said European steel imports had declined 49 percent during April so no duties would be levied retroactively, as Baldrige had threatened to do. However, Commerce officials said they will watch import figures for May and possibly make some penalties retroactive later.

The EEC's Viscount Etienne Davignon at a news conference in Brussels earlier yesterday said that Commerce's decision "is unacceptable to us. It is a bad case from the commercial, legal and certainly also political point of view. It has been quite clear that the highest level of American administration has not perceived the real meaning of this case. They have not realized that this was not a small sectoral problem."

"But this certainly has a protectionist flavor about it," Davignon continued. "It has appeared also that the American administration has not been able or willing to control its industry. We regret that efforts have not brought about a solution. It is a political and damaging error that the United States has not made the effort to press their industry."

Retaliation could take the form of restrictions on shipments of U.S. textiles and agricultural products to Europe, and efforts to outlaw some tax advantages granted American exporters by Congress.

The complaints were filed last January by seven of the nation's largest steel companies led by U.S. Steel Corp., which alleged they were hurt by unfairly subsidized steel imports. The decision was greeted with cautious optimism by Capitol Hill and the steel industry.

"We take no satisfaction from the disruptive effect these decisions will have on unfairly traded steel from the countries involved," said U.S. Steel Chairman David M. Roderick. "However, we have and are continuing to suffer severe economic injury as the result of such imports and we have no alternative but to avail ourselves of the trade laws . . . . "