Britain on Friday condemned Russian proxy authorities in Donbas for what it called an "egregious breach" of the Geneva convention in sentencing to death two British nationals captured in the separatist region while fighting for Ukraine.

Prime Minister Boris Johnson's spokesman said he was talking to Ukraine rather than Russia over the situation facing Aiden Aslin and Shaun Pinner, who were convicted of "mercenary activities" on Thursday by a court in the self-proclaimed Donetsk People's Republic (DPR).

Aslin's family said he and Pinner "are not, and never were, mercenaries."

They had been living in Ukraine when the war broke out and "as members of Ukrainian armed forces, should be treated with respect just like any other prisoners of war," the family said in a statement.

A U.N. official said trials conducted under such circumstances were tantamount to war crimes.

Johnson's spokesman said Britain's priority was to work with the Ukrainian government to secure the soldiers' release as quickly as possible.

Asked if Britain would also talk to Russia, the spokesman said: "We don't have regular interaction with the Russians."

UK foreign minister Liz Truss called Aslin and Pinner's sentencing an "egregious breach of the Geneva convention".

Russia's foreign ministry said Britain's reaction to such sentences was "often hysterical", and that it should appeal to the self-proclaimed DPR authorities about the soldiers.

Britain does not recognise the DPR and the Ukrainian government has no control over the parts of eastern Ukraine that the separatists hold.

Russia has deployed massive firepower there to extend the separatists' reach as part of its invasion of Ukraine, which it terms a "special military operation".

Russian Foreign Minister Sergei Lavrov said the two Britons and Brahim Saadoun, a Moroccan also sentenced to death, had committed crimes on the territory of the self-proclaimed breakaway state.

Among United Nations member states, only Russia recognises the entire Ukrainian province of Donetsk, much of which remains under Ukrainian control, as the independent DPR. The territory is internationally recognised as part of Ukraine.

A senior Ukrainian official said Russia wanted to use the three foreigners as hostages to put pressure on the West over peace negotiations.

The U.N. official, speaking in Geneva, expressed concern.

"According to the chief command of Ukraine, all the men were part of the Ukrainian armed forces - and if that is the case, they should not be considered as mercenaries," he told reporters.

"Such trials against prisoners of war amount to a war crime."