OTTAWA, MAY 30 -- Soviet President Mikhail Gorbachev strongly urged the West today not to attempt to exploit his domestic troubles by imposing a European security framework in which a unified Germany would be part of the North Atlantic Treaty Organization.

"I think if you have the hopes, I will disappoint you," he said, adding that the West should not think that "you can fish in muddy waters" just because he is preoccupied with nationalist unrest and a rapidly deteriorating economy.

But Gorbachev, in an airport news conference here before leaving for Washington and a meeting with President Bush, said the Soviet Union was prepared to show some accommodation on the German question. At one point, he even said, "I'll have some new thoughts, maybe, by the time I get to Washington."

Standing alongside Canadian Prime Minister Brian Mulroney, Gorbachev said, "I believe we do have some leeway to find some accommodation. There are different possibilities, different scenarios which might not be exactly what the West would like."

The Soviet Union has opposed the inclusion of a unified Germany in NATO, fearing it would foster an imbalance of forces in Europe. Gorbachev accused the West today of trying to tell him what to do. "The West hasn't done any thinking but has tried to dictate, and that doesn't suit us," he said. The discussions on a reunified Germany's political or military role in NATO, Gorbachev stressed, should not be viewed "just as a 30-second basketball match. You have to ask: What does the other side want? Maybe we have to take a timeout."

Mulroney noted the suffering of the Soviets at German hands during World War II and said there had been an "inadvertent insensitivity to the legitimate security apprehensions of the Soviet Union."

Earlier in the day, Gorbachev displayed weariness over constant questions about German unification, saying, "It seems to be an old record that we have been playing over and over again, and I would like to find a new melody."

Gorbachev showed little flexibility at the news conference on the question of Lithuania being allowed to continue its moves toward independence outside the framework of the Soviet constitution.

Calling the manner in which Lithuania unilaterally announced its secession from the Soviet Union a "dishonest and thief-like fashion," Gorbachev said his position has not undergone any change, and that Lithuania must follow constitutional procedures.

His voice rising in anger, Gorbachev said, "Okay, if we are using our constitutional right to secede, we say, okay, secede. But you are not leaving this geographic area. Why are you acting this way with people whom you intend to carry on relations?

"I say this to their face and I say it here now. Everything's got mixed up. We're not going to let ourselves be guided by emotions," the Soviet president said. He added, "If you are talking about a football match, okay, let your emotions go . . . {but} we're going to solve this our own way."

Gorbachev complained that France gave New Caledonia 10 years to secede, but "we've been given 10 hours."

Gorbachev acknowledged that "national dignity is awakening and is just and has to be reflected in policy." But he reiterated that it must be done under the Soviet constitution.

His statements came during a series of answers to questions that attempted to draw the two leaders out on similarities they face as nationalism rises in each of their countries.

Mulroney is being challenged by an increasingly militant separatist movement in Quebec, the result of a stalemate over proposed constitutional reforms that would recognize the predominantly French-speaking province as a "distinct society."

Mulroney dismissed comparisons between the Soviet Union and Canada, saying Quebec in 1867 was a "willing partner" in the Canadian confederation. Mulroney repeatedly contrasted Quebec and Lithuania, noting that Quebec was "an architect in the family of Canada."

However, the Canadian prime minister acknowledged, "We have our own problem. I'm seeking to deal with some of this now."

Earlier Gorbachev, after laying a wreath at Ottawa's War Memorial, turned away from his waiting limousine and made an unscheduled 15-minute walk to Parliament for his meeting with Mulroney.

Obviously enjoying himself -- and, presumably, television images of an enthusiastic public welcome being broadcast to Soviet viewers -- the Soviet president repeatedly stopped to shake hands, sign autographs and chat with Canadians lining the street.

It was the third time during his 30-hour layover that Gorbachev plunged into crowds of cheering Canadians like a campaigner, and it appeared to catch Mulroney by surprise. However, the prime minister immediately assumed the role of an advance man of sorts, picking people out of the crowd for introductions to Gorbachev and participating in the light banter that characterized the walkabout.

As he approached Parliament Hill, where demonstrators from Soviet Baltic states were beginning to gather, the Soviet leader climbed into his limousine for the last several hundred yards of the trip.

As he was introduced to members of Parliament, Mulroney and Gorbachev joked about political affiliations, with Mulroney saying at one point that one member was in opposition because he was a socialist and that the Soviet leader should not talk with the opposition.

Gorbachev replied, "It is assumed if you're part of the opposition to the ruling party, then you're bad."

Outside the Parliament building, several thousand demonstrators of Baltic origin demanded that Gorbachev lift his economic embargo of Lithuania and allow independence for the three Baltic republics, including Estonia and Latvia, and for the Ukraine.

Signs declaring "Gorbachev not welcome in Canada" and "Gorbachev, give up your colonial empire" greeted the Soviet president, but he showed no sign of noticing the protest.

As the two leaders met inside, the crowd listened to speeches that condemned steps Gorbachev has taken against Soviet republics that have unilaterally declared their independence.

The keynote speaker, Guntis Siling, head of the Latvian National Federation of Canada, declared, "Today, the president of the Soviet Union is a welcomed guest of the government of Canada. We want to send him a message: Yes, you have been responsible for great changes in central and Eastern Europe. The people of Poland, Czechoslovakia and Hungary thank you. But what about your inner empire, your prison of Baltic nations?

"Why do you not apologize to the people of Latvia, Lithuania and Estonia for the acts of your predecessors? Your morality seems to be skin deep. Show us that you want to abide by the rule of law."

The peaceful demonstration reflected the ethnic diversity of Canada, with Vietnamese and other ethnic groups protesting in support of the Baltic immigrants, and flags of half a dozen East European countries being displayed.

One protester of Ukrainian origin, Stepan Bandera, 20, said the 800,000 Canadian-Ukrainians would press governments around the world until the Soviet Union grants independence to its second-largest and strategically important republic.

But Bandera said he anticipated a long struggle, adding, "Moscow will let everything go but hold onto the Ukraine as long as it can. The whole Soviet system is bankrupt. It's going down the drain."