Russian nationalists were behind an alleged coup attempt in Montenegro that included plans to assassinate the pro-western prime minister over his government’s attempt to join Nato, the country’s chief special prosecutor has said.

Milivoje Katnić said an investigation concluded that “nationalists from Russia” organised a criminal group, which planned to break into the Montenegrin parliament on election day, kill the prime minister Milo Đukanović and bring a pro-Russian coalition to power.

About 20 Serbian and Montenegrin citizens, including a former commander of Serbia’s special police forces, were arrested in Montenegro on 16 October. Fourteen remain in custody, including some who have fought for pro-Russia rebels in eastern Ukraine.

Russian officials deny any involvement, but have openly supported so-called patriotic parties that oppose Montenegro’s application for Nato membership.

Katnić told reporters: “We don’t have any evidence that the state of Russia is involved in any sense ... But we have evidence that two nationalists from Russia were organisers.”

Serbian authorities are said to have deported an unspecified number of Russian operatives monitoring Đukanović’s movements from Serbian territory.

“Special prosecution of Serbia had those persons under its supervision ... and prevented them from realising their plan,” Katnić said. “Those persons are not on the territory of Serbia any more. I don’t know where they are now, in Russia or somewhere else.”

He said 500 people were intended to enter Montenegro on election night to “cause violence ... and hire professional sharpshooters to kill the prime minister” as part of the planned coup.

“The plan was to stop Montenegro on its Euro-Atlantic path, especially to prevent it from entering Nato,” Katnić said.

Montenegro has been invited to join the military alliance despite strong opposition from Russia. The country’s accession would mean Russia losing strategic access to the Adriatic Sea and an ally in the Balkans.

Nato’s deputy secretary general, Rose Gottemoeller, who visited Montenegro last week, said she expects the country to become a member in spring 2017 after all 28 Nato member states ratify the agreement in their respective parliaments.