MOSCOW—Russian Prime Minister Dmitry Medvedev on Monday issued a stern assessment of events in Ukraine, questioning the legitimacy of its nascent government and saying that the turmoil there poses a threat to Russian interests.

Mr. Medvedev's harsh remarks represented the highest-level response to come from Russia since Ukrainian President Viktor Yanukovych was overthrown this weekend and cast doubt on hopeful appeals from the West that Russia play a central role in helping stabilize its crisis-torn neighbor.

"It is not clear to us what is going on in the country and there is a real threat to our interests," Mr. Medvedev told reporters in Sochi, according to a transcript of his remarks posted on the government website.

While Mr. Medvedev said Russia is willing to honor all "legally binding" agreements it made with the previous government, he said Moscow wasn't prepared to deal with masked men carrying guns.

"Strictly speaking, today there is no one to talk to there. The legitimacy of a whole host of government bodies is raising huge doubts," he said. "If people crossing Kiev in black masks and Kalashnikov rifles are considered a government, it will be difficult for us to work with such a government."