SIMFEROPOL, Ukraine — Masked men with guns seized government buildings in the capital of Ukraine’s Crimea region on Thursday, barricading themselves inside and raising the Russian flag after mysterious overnight raids that appeared to be the work of militant Russian nationalists who want this volatile Black Sea region ruled from Moscow.

Police officers sealed off access to the buildings but said that they had no idea who was behind the assault, which sharply escalated tensions in a region that serves as home to Russia’s Black Sea Fleet and also to a number of radical pro-Russia groups that have appealed to Moscow to protect them from the new interim government in Kiev, the Ukrainian capital.

Adding to the confusion, Viktor F. Yanukovych, the ousted president of Ukraine, declared on Thursday that he remained the country’s lawful leader and appealed to Russia to “secure my personal safety from the actions of extremists.” Russian news agencies reported that he had already arrived in Russia, but officials did not immediately confirm that.

In the Ukrainian Parliament in Kiev, lawmakers dismissed Mr. Yanukovych’s statement as irrelevant and a reflection that he had lost touch with political reality. “Yanukovych is no longer president,” Arseniy P. Yatsenyuk, who was overwhelmingly approved as acting prime minister by the Parliament on Thursday, told the Ukrainska Pravda news site. “He is a wanted person who is suspected of mass murder and crimes against humanity.”