A Ukrainian court sentenced a 21-year-old Russian soldier to life in prison on Monday for killing a Ukrainian civilian, in the first war crimes trial since Russia’s invasion.

Sgt. Vadim Shishimarin was accused of shooting a Ukrainian civilian in the head in a village in the northeastern Sumy region in the early days of the war.

He pleaded guilty and testified that he shot the man after being ordered to do so. He told the court that an officer insisted that the Ukrainian man, who was speaking on his cellphone, could pinpoint their location to the Ukrainian forces.

During the trial, Shishimarin asked the widow of the victim to forgive him.

His Ukraine-appointed defense attorney, Victor Ovsyanikov, argued his client had been unprepared for the “violent military confrontation” and mass casualties that Russian troops encountered when they invaded. He said he would appeal.

Ukrainian civil liberties advocate Volodymyr Yavorskyy said it was “an extremely harsh sentence for one murder during the war.” But Aarif Abraham, a British-based human rights lawyer, said the trial was conducted “with what appears to be full and fair due process," including access to an attorney.

Ukrainian prosecutors are investigating thousands of potential war crimes. Russian forces in Mariupol bombed a theater where civilians were sheltering and struck a maternity hospital. In the wake of Moscow’s withdrawal from around Kyiv weeks ago, mass graves were discovered and streets were strewn with bodies in towns such as Bucha.