TURNBERRY, SCOTLAND, JUNE 7 -- Foreign ministers of the North Atlantic Treaty Organization expressed guarded optimism today that the Soviet Union is moving toward accepting the idea that a united Germany can belong to NATO without posing a security threat to Soviet interests.

The ministers met in this windswept Scottish coastal town to prepare for next month's summit of NATO heads of state, who will begin examining how to transform what has been primarily a Cold War military alliance to meet the dramatic changes sweeping across Europe.

There was no indication that the nations meeting here had resolved their differences over the substance and timing of future limitations on the armed forces of a united Germany. Many officials say such limitations would help diminish Soviet anxieties about German membership in NATO.

The group also apparently did not reach a consensus on the agenda for future U.S.-Soviet talks on short-range nuclear forces, or on the potential modernization of existing U.S. nuclear weapons in Europe.

British Prime Minister Margaret Thatcher opened the session with a call for keeping U.S. nuclear weapons "up-to-date and forward-based in Europe," but West German officials said a planned Tactical Air-to-Surface Missile, or TASM, would not be deployed on their territory.

"This is not the time to speak of new nuclear missiles that could reach the Soviet Union from Germany; that is ridiculous," a West German official said when asked by reporters about TASM deployment plans.

The ministers took a hopeful view on the status of a unified Germany after hearing Secretary of State James A. Baker III report on the meeting in Washington last week between President Bush and Soviet President Mikhail Gorbachev and Baker's subsequent talks with Soviet Foreign Minister Eduard Shevardnadze in Copenhagen on Tuesday.

The Soviets thus far have given no public sign of backing away from Gorbachev's insistence that a unified Germany cannot be a member of the Western military alliance. Gorbachev's statements today at the opening of a Warsaw Pact meeting in Moscow appeared to reiterate his demand for a neutral Germany.

That stand runs directly counter to the insistence of the Bonn government and its NATO allies that the new German state must be anchored firmly in the West through membership in NATO and the European Community. Disagreement between East and West on this point has created a stalemate that could upset hopes for achieving German unification by the end of the year.

However, a senior U.S. official said Baker believes that the Washington and Copenhagen talks may have given the Soviets a greater sense that NATO is not necessarily their enemy and could evolve a new, more cooperative relationship with Moscow.

"There is a sense that the direction is positive," said the official, who declined to be identified. But he also stressed that the Western optimism is based more on atmospherics than concrete facts, and he added: "I don't want to give the impression of a major breakthrough in the offing. . . . The changes in Soviet thinking appear to be evolutionary, and I don't want to suggest the way has been pointed to some great opening."

Similarly, a British official said Baker and West German Foreign Minister Hans-Dietrich Genscher, in their speeches to the closed meeting, expressed optimism "that the Soviets want to come to an agreement on Germany and would ultimately come around."

East and West Germany and the four principal World War II victors with responsibilities in Germany -- the United States, the Soviet Union, Britain and France -- will meet in Berlin June 22 to try again to resolve the impasse. Genscher announced today that the parliaments of the two German states will meet separately the day before to issue a joint declaration aimed at easing concerns about German policy toward neighbors by recognizing the inviolability of Germany's postwar border with Poland.

At the conclusion of the summit last Sunday, Baker said Shevardnadze had talked vaguely of the possibility of resolving some Soviet concerns about Germany through some kind of agreement between NATO and the Warsaw Pact.

After their Copenhagen meeting, Shevardnadze said he had given Baker more details about what he meant. Baker, who reported the substance of the Copenhagen talks to the meeting here, has said the Soviets still must "flesh out their ideas."

"Shevardnadze spoke of it in very general terms, but he gave the sense that he would send us some greater elaboration of his ideas," the U.S. official said. "Baker promised him that when we get their ideas, we will explore them."

The official said all 16 NATO ministers showed interest in the idea of greater cooperation with the Warsaw Pact. But, he added, some urged caution before NATO becomes too closely involved with an alliance that has largely lost its significance as a military threat.