Western Europe today joined the United States to put relations with Moscow on the line in a blunt statement warning that further aggressive Soviet actions against Poland, or any other state, would mean the end of detente.

Declaring that detente had already been "seriously damaged" by the Soviet invasion of Afghanistan last December, the 15 NATO foreign ministers meeting here said, "It could not survive if the Soviet Union were again to violate the basic rights of any state to territorial integrity and independence."

The warning came in a communique issued after two days of intensive consultations, largely about the situation in Poland, during which the ministers displayed full agreement on the need to take political and economic sanctions against Moscow if the Soviets intervene.

"Poland should be free to decide its own future," the communique said. "The allies will respect the principle of nonintervention and strongly urge others to do likewise."

"Any intervention would fundamentally alter the entire international situation. The allies would be compelled to react in the manner which the gravity of this development would require."

While foreceful, the statement did not mention the exact measures to be taken in the event of Soviet intervention. These were not decided on at this ministerial session, although a direct military response has been effectively ruled out.

U.S. Secretary of State, Edmund Muskie, in a briefing for reporters after the meeting, defended the lack of specificity on the grounds that it is difficult to predict what form a Soviet intervention might take. The implied idea was that the response from the North Atlantic Treaty Organization would vary according to the degree of any Soviet action.

Moreover, Muskie said, sometimes the more persuasive tactic is "if you don't drop the second shoe."

Nor was it clear, what the West would regard as enough to constitute an intervention and trigger a coordinated NATO response. Asked what the guidelines were, Muskie said there were none.

A Soviet intervention in Poland "in any form," he said, would be sufficient to prompt an immediate meeting in Brussels of NATO foreign ministers to consider "a range of options" that will be prepared in the meantime by the permanent representatives to NATO.

Pressed to elaborate on possible Polish scenarios, Muskie said that "what we have tried to establish here is a policy and a mechanism to enable us to take into account whatever happens and to respond to it with appropriate measures. But to try to put together a Sears Roebuck catalogue of hypothetical possibilities I don't think is conceivable."

Asked specifically whether the Western alliance would react if Polish authorities themselves, presumably under pressure from Moscow, took repsonsive measures against the independent trade unions, Muskie indicated this would probably not trigger NATO sanctions since U.S. policy has been not to interfere in what goes on between the Polish people and their government.

Still, the statement of NATO unity on Poland was especially significant for its contrast with the divisions and bickering that characterized the West's response to the Soviet invasion of Afghanistan a year ago.

West Europeans, feeling they had deeper investments in detente to protect, then resisted U.S. efforts to coordinate a boycott of the Moscow Summer Olympics and a curtailment of Western economic deals with the Soviet Union.

This time, the Europeans appeared to want to leave little doubt of their common resolve with the United States.

Linking Afghanistan and Poland, Muskie said, "I think the Soviet Union ought not to overlook the cumulative effect of these two actions within a period of one year. Each one of them taken separately would not have provoked the allied response that the two taken together within that time frame have provoked. . . . One is an incident; two are a pattern of conduct."

[In Washington, President Carter, who received a report on the meeting from Muskie, hailed the allied resolve and said he thought the meeting produced "positive and productive results," according to White House Press Secretary Jody Powell.]

The NATO ministers reiterated that the Soviet occupation of Afghanistan is "unacceptable," and noted that, one year later, "the Afghan people still suffer from repression by foreign troops on their soil."

By taking a firm stand now on Poland, the NATO allies are clearly hoping to dissuade the Soviets from intervening, thus making it necessary to end detente. The dilemma for Western officials has been how to strike the balance between warning Moscow of the high risks of an invasion while doing nothing to suggest that it was seen as inevitable.

[In Ottawa, Canadian Prime Minister Pierre Trudeau said the alliance's commitment to oppose a Soviet invasion of Poland could lead to a major international crisis. "Any intervention by one side is liable to lead to an intervention by the other side. Therefore, I think we should steer miles away from any hint of any intervention," he told a news conference.]