BAKU, Azerbaijan (AP) — A court in Azerbaijan on Thursday sentenced a Russian blogger to three years in prison for illegally crossing the border after he made a trip to a separatist-controlled region of the country.

Alexander Lapshin was detained by police in Belarus last year and extradited to Azerbaijan where authorities filed charges against him over his trip to Nagorno-Karabakh via Armenia several years ago. The blogger's extradition from Belarus came amid a rift between Russia and Belarus, making the Lapshin case a highly politicized matter.

Nagorno-Karabakh is officially part of Azerbaijan. Since a separatist war ended in 1994, it has been under the control of forces that claim to be local ethnic Armenians but that Azerbaijan claims include Armenian troops.

Efforts to negotiate a settlement have failed, and frequent clashes have continued. Just this weekend, separatist authorities in Nagorno-Karabakh said four of their troops were killed in fighting, and Azerbaijan said one of its soldiers was killed Friday.

The judge at the court in Azerbaijan's capital Baku on Thursday convicted Lapshin of illegally crossing the border, but found him not guilty of "public calls against the state," a second charge he faced. Prosecutors asked the court to sentence the blogger to six years in prison.

Lapshin's lawyer, Eduard Chernin, told reporters after the ruling that his client, who also holds Ukrainian and Israeli citizenship, will appeal the verdict and hopes for extradition to one of his home countries.

In his final argument on Wednesday, Lapshin pleaded not guilty and said that he respects Azerbaijan's territorial integrity.