A Montenegro court has sentenced 13 people, including two Russian secret service operatives, to up to 15 years in prison after they were convicted of plotting to overthrow the Balkan country's government and prevent it from joining NATO.

Chief judge Suzana Mugosa said Thursday the two Russians, identified as Eduard Shishmakov and Vladimir Popov, were convicted of "attempted terrorism" and "creating a criminal organization." The two were being tried in absentia.

Shishmakov received a 15-year prison term while Popov got 12 years. Two leading ethnic Serb opposition politicians were sentenced to five years each.

The verdict says the group planned to take over parliament on election day on Oct. 16, 2016, assassinate then-Prime Minister Milo Djukanovic and install a pro-Russia, anti-NATO leadership.

Montenegro joined NATO in 2017 despite Moscow's opposition.