MOSCOW — Russia shrugged off Western condemnation of its capture of three Ukrainian naval ships and their crews, moving ahead Tuesday with court proceedings against some of the 24 detained sailors.

Ukraine, meanwhile, prepared to impose martial law in 10 of the country’s 27 regions after the country’s leaders warned of the threat of a Russian attack. Russian officials, however, brushed aside Kiev’s response as politically motivated alarmism and voiced confidence that Moscow would ride out the criticism and threats of deeper sanctions.

The United States and the European Union have appealed to Russia and Ukraine to exercise restraint after Sunday’s maritime clash near the narrow Kerch Strait between mainland Russia and Crimea, which Russia annexed from Ukraine in 2014.

The regions of Ukraine where martial law was set to take effect on Wednesday included the Azov Sea coast as well as its waters.

Ukraine’s president, Petro Poroshenko, told CNN that Ukraine may restrict the ability of Russians to enter the country during the 30-day martial law period. The country had intelligence, he said, that Russia was concentrating large numbers of troops along Ukraine’s borders.

“We should be simply ready not to repeat once again the situation of the year 2014,” Poroshenko said. “We undertake all our efforts to defend and protect our sovereignty.”

But a Russian deputy foreign minister, Alexander Grushko, interpreted the Western calls for both sides to ease tensions as a signal that even Western officials believed Ukraine shares some blame.

“This is a sort of acknowledgment, through their teeth, that the Ukrainian side is also at fault, even from their point of view,” Grushko said on the sidelines of a conference in Berlin, according to the Interfax news agency. “From a military point of view, this incident has now fully run its course.”

In a further sign of Russia’s resistance to Western pressure, a court in Russian-controlled Crimea ordered at least two of the detained Ukrainian sailors to remain behind bars until at least Jan. 25 on charges of illegally crossing the border, Russian media reported.

Ukraine acknowledged on Tuesday that the ships had onboard agents from its SBU intelligence service. Russia has claimed the agents were on a mission to stir up a “provocation” in the Kerch Strait. Ukraine says they were on normal counterintelligence operations for the navy.

The U.S. State Department on Monday had called for the detained sailors to be freed and Ukraine’s ships returned.

Russia’s moves indicated the Kremlin was confident it would weather Western criticism amid a new flash point between Russia and Ukraine, which has battled separatists in two pro-Moscow breakaway regions since 2014.

Sunday’s incident and the aftermath amounted to “resolve signaling” by both Russia and Ukraine, Moscow foreign policy analyst Vladimir Frolov said.

With President Trump largely quiet and Poroshenko facing a backlash at home over his handling of the crisis, Russian President Vladimir Putin appears to be succeeding in showing his upper hand in the region. 

The Black Sea incident has allowed Putin to “test the West’s reaction as to how much use of force could go unpunished and whether sanctions resolve is still there,” Frolov said. “It is not.”

Sunday’s incident took place as three Ukrainian navy ships were trying to pass through the Kerch Strait. Russia claims that Ukrainian sailors ignored the instructions of the pilot meant to guide them through the strait and illegally entered Russian territorial waters instead. 

The Kerch Strait is a critical artery for Ukraine, giving the ports in the country’s industrial southeast access to shipping routes to Western Europe and Asia. While Russia and Ukraine agreed in 2003 on joint oversight of the strait and the adjoining Azov Sea, Russia has been effectively in control of it since its annexation of Crimea in 2014. 

Tensions have risen in recent months after Russia’s new bridge between Crimea and the mainland limited the kinds of ships able to pass through the strait.

Western officials say Russia is using its naval muscle in the Azov Sea to squeeze Ukraine’s economy. Russia denies the charges and says it continues to abide by the 2003 agreement granting both countries full use of the Kerch Strait and the Azov Sea. 

Ukraine’s foreign minister, Pavlo Klimkin, told the Associated Press that he has asked the head of the International Committee of the Red Cross to try to arrange a visit to the Ukrainian sailors.