SEVASTOPOL, Crimea (AP) — Surrendering to Russia's inexorable seizure of Crimea, Ukraine announced plans Wednesday for mass troop withdrawals from the strategic peninsula as Moscow-loyal forces seized control of Kiev's naval headquarters here and detained its commander.

Attempting to face down the unblinking incursion, Ukraine said it would hold joint military exercises with the United States and Britain.

Hours after masked Russian-speaking troops forced their way onto Ukraine's main naval base here, forlorn Ukrainian soldiers streamed out carrying clothing and other belongings in bags. A group of local militia and Cossacks, later joined by officers from Russia's Black Sea Fleet, looked on.

Just how many retreating troops Ukraine will have to absorb in what amounts to a military surrender of Crimea was unclear. Many servicemen have already switched sides to Russia, but authorities said they were prepared to relocate as many as 25,000 soldiers and their families to the Ukrainian mainland.

Humbled but defiant, Ukraine lashed out symbolically at Russia by declaring its intent to leave the Moscow-dominated Commonwealth of Independent States, a loose alliance of 11 former Soviet nations. The last nation to leave the group was Georgia, which lost a brief war with neighboring Russia in 2008 and ended up losing two separatist territories.

Vice President Joe Biden, in Lithuania trying to reassure nations bordering Russia alarmed by the sight of an expansion-minded neighbor, said the U.S. would stand by them.

"We're in this with you, together," Biden said.

Ukraine has been powerless to prevent Russian troops from taking control of Crimea, which President Vladimir Putin formally annexed Tuesday with the stroke of a pen. Crimea's absorption came after a hastily organized referendum in which the population overwhelmingly, albeit under conditions akin to martial law, voted in favor of seceding from Ukraine and joining Russia.

Russia's Constitutional Court chairman, Valery Zorkin, said Wednesday the treaty signed by Putin has been ruled valid, meaning it now only requires ratification by the Russian parliament.

Story continues

On Wednesday morning, militiamen under apparent Russian command barged their way into Ukraine's naval headquarters in Sevastopol, detaining the head of Ukraine's navy and seizing the facility. The incursion, which Ukraine's Defense Ministry described as being led by a self-described local defense force, Cossacks and "aggressive women," proceeded with no resistance.

Upon gaining entrance to the base, the storming party raised a Russian flag on the headquarters square.

The unarmed militiamen waited for an hour on the square and, following the arrival of the commander of the Russian Black Sea Fleet, they took over the building.

By afternoon, they were in full control of the naval headquarters, a set of three-story white concrete buildings with blue trim.

The Ukrainian Defense Ministry said Rear Adm. Sergei Haiduk was detained and a news agency close to the Russian-backed local authorities reported that he had been summoned for questioning by prosecutors. Later in the day, Russian Defense Minister Sergei Shoigu ordered the Crimean authorities to release Haiduk.

With thousands of Ukrainian soldiers and sailors trapped on military bases, surrounded by heavily armed Russian forces and pro-Russia militia, the Kiev government said it was drawing up plans to evacuate its outnumbered troops from Crimea back to the mainland and would seek U.N. support to turn the peninsula into a demilitarized zone.

"We are working out a plan of action so that we can transfer not just servicemen, but first of all, members of their family who are in Crimea, quickly and effectively to mainland Ukraine," said Andriy Parubiy, secretary of Ukraine's National Security and Defense Council.

Parubiy also announced Ukraine would hold military maneuvers with the United States and Britain, signatories, along with Russia, of the 1994 Budapest Memorandum. He provided no details.

The document was designed to guarantee Ukraine's territorial integrity when it surrendered its share of Soviet nuclear arsenals to Russia after the Soviet Union broke up in 1991. Ukraine has accused Russia of breaching the agreement by taking over the Crimean Peninsula.

In Washington, the Pentagon said it would participate as planned in a multinational military exercise this summer in Ukraine. Dubbed "Rapid Trident," the ground maneuvers have been held annually for a number of years with forces from Britain and other NATO countries as well as Ukraine, which has a partner relationship with NATO but is not a member.

The Pentagon gave no details on the number of U.S. forces expected to participate or when the exercises would be held. Last year, the two-week maneuvers involving 17 nations were held in July.

Meanwhile, in a warning to Moscow, Biden declared that the United States will respond to any aggression against its NATO allies, including neighbors to Russia.

Standing with two Baltic leaders in the Lithuanian capital, Vilnius, Biden said the U.S. was "absolutely committed" to defending its allies, adding that President Barack Obama plans to seek concrete commitments from NATO members to ensure the alliance can safeguard its collective security.

"Russia cannot escape the fact that the world is changing and rejecting outright their behavior," Biden said after meeting with Lithuanian President Dalia Grybauskaite and Latvian President Andris Berzins.

Beyond the grander political gestures of the day, Parubiy said Ukraine's Foreign Ministry had been instructed to introduce a visa regime for travel between the two nations. The move could badly affect Ukrainian migrant laborers, many of whom work in Russia and send home money. It came against the backdrop of claims that Russian citizens were pouring across the Ukrainian border to foment secessionist unrest in bordering eastern regions.

U.N. Secretary General Ban Ki-moon was headed to the region to try to seek a diplomatic way out of the crisis. He was to meet with Russian leaders in Moscow on Thursday, followed by talks Friday with Ukraine's new government.

Ban has repeatedly called for a solution guided by the principles of the U.N. Charter including sovereignty, territorial integrity and unity of Ukraine.

A 34-member U.N. human rights monitoring mission was also scheduled to be in place by Friday. Ivan Simonovic, assistant secretary-general for human rights, expressed particular concern over the security of Tatars and other ethnic minorities in Crimea.

Russian Ambassador Vitaly Churkin dismissed Simonovic's assessment as "one-sided."

_______________

Leonard reported from Kiev, Ukraine. Associated Press writers Alexandra Olson at the United Nations and Robert Burns in Washington contributed to this report.