The move came after Kiev imposed martial law in border regions this week in response to the Russian seizure of the ships and 24 sailors off Moscow-annexed Crimea.
The incident was the most dangerous in years between the ex-Soviet neighbours — who are locked in conflict over Russian-backed separatist regions — and has raised fears of a wider escalation.
"As of today, entry is restricted for foreigners — in the first instance for male citizens of the Russian Federation age 16 to 60," the head of the border service Petro Tsyhykal said at a meeting with President Petro Poroshenko that was broadcast live.
Poroshenko said the restriction will not apply to "humanitarian cases."
Trump cancels Putin meeting over Ukraine crisis
Moscow slammed the move, but said it will not impose similar restrictions on Ukrainians.
"If someone will try to mirror what is happening in Kiev, it would lead to some kind of insanity," Russian foreign ministry spokesperson Maria Zakharova told a press briefing Friday.
She called the decision part of the "ill-conceived, wild direction" of the Ukrainian leadership.
Moscow and Kiev have traded angry accusations since Russian navy vessels fired on, boarded and captured the three Ukrainian ships last Sunday.
Courts in Crimea sentenced the 24 Ukrainian sailors to two months detention, despite international calls for their release.
US President Donald Trump scrapped a planned meeting at the G20 summit with his Russian counterpart Vladimir Putin over Moscow's detention of the sailors.
Russia insists they crossed into Russian waters illegally, with Putin saying the border guards "fulfilled their military duty" in seizing the ships.
Crimea's human rights ombudsman Lyudmila Lubina on Friday told Russian media that the sailors have been transferred from Crimean jails to Moscow.
Ukraine has called their detention "illegal."
Kiev imposed martial law for 30 days in 10 regions that border Russia, the Black Sea and the Azov Sea on Wednesday.
Europe rebuffs Ukrainian calls for action in Russia standoff
The decision came after Poroshenko warned of a build-up of Russian tanks near Ukraine's borders, escalating the most dangerous crisis in years between the ex-Soviet neighbours.
European leaders this week rebuffed calls from Ukraine for greater support against Russia, after Kiev urged NATO to send ships into waters disputed with Moscow.
German Chancellor Angela Merkel asked Kiev to be "sensible" following the request from Poroshenko, just hours after the European Union failed to agree to threaten new sanctions against Moscow.
But, while blaming Russia for tensions, Merkel showed no signs of being ready to back military support.
Ukraine has also urged Western governments to impose more sanctions on Russia over the incident, but there too it has seen little support.
In a statement on Wednesday, the EU strongly condemned Russia's actions but, after three days of debate among senior officials, could not agree on a tougher response.
NATO spokesperson Oana Lungescu said the issue would be raised at next week's regular meeting of alliance foreign ministers in Brussels, where Ukrainian Foreign Minister Pavlo Klimkin is also expected.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ