BISHKEK (Reuters) - Kyrgyzstan’s state security service said on Saturday it had detained an opposition lawmaker just two weeks before presidential elections, and accused him of planning riots and a violent coup.

The GKNB security service said in a statement that deputy Kanatbek Isayev, a supporter of main opposition presidential candidate Omurbek Babanov, had conspired with criminal groups to orchestrate rioting during and after the Oct.15 vote.

The impoverished Central Asian country, which is home to a Russian military airbase, has a reputation for political volatility after two previous presidents were toppled by violent riots.

Incumbent leader Almazbek Atambayev, who has drawn Bishkek into Russia’s orbit during his six years in power, is preparing to step down as the constitution bars him from seeking a second term at the helm of the nation of 6 million people.

Instead, Atambayev’s Social Democratic party, which leads a parliamentary coalition, is backing his ally, former prime minister Sooronbai Jeenbekov.

Babanov, also a former prime minister, could not be reached for comment on Saturday.

A February-March poll by the United States’ International Republican Institute showed Babanov was the most trusted politician in Kyrgyzstan and second only to Atambayev in terms of the proportion of people who viewed him favorably.