(Adds quotes, analyst, details, background)
By Denis Dyomkin and Raushan Nurshayeva
ASTANA, Oct 15 (Reuters) - Russia, alarmed by increased activity by Islamist insurgents near its borders with Central Asia, may act to re-establish its control over Tajikistan's border with Afghanistan, a senior Russian defence official said on Thursday.
Taliban insurgents have made advances in the Afghan province of Kunduz, bordering Tajikistan, while the prospect of Islamic State-trained militants arriving in the region from the conflict in Syria have increased security fears among Russia and its Central Asian allies.
Speaking after meeting Russian President Vladimir Putin on Thursday, Kazakh President Nursultan Nazarbayev said they were "very concerned with the situation in Tajikistan".
Russian military used to patrol Tajikistan's sensitive border with Afghanistan, pulling out in 2005 by agreement with the local government.
Asked by Reuters if Moscow might re-establish its control of Tajikistan's border with Afghanistan, Russian Deputy Defence Minister Yuri Borisov said: "I don't rule it out."
Referring to a Russian military base in Tajikistan which maintains a 6,000-strong force, Borisov said: "We have a base there as you know. Our political leaders will discuss and decide. Everything is possible."
Kazakhstan, Central Asia's largest economy and the second-largest post-Soviet oil producer after Russia, has itself been rocked by clashes between its security forces and Islamist insurgents.
Possible terrorist threats are expected to loom large on the agenda of meetings of foreign ministers of the Russia-led CIS in Kazakhstan later on Thursday and of CIS heads of state on Friday.
In October 2013, Tajikistan ratified a deal with Moscow, agreeing to extend the deployment of Russian soldiers at the base by three decades.
Tajikistan lost tens of thousands of lives in a 1992-97 civil war between its Moscow-backed secular government and Islamist guerrillas.
The fragile peace in the Muslim state of 8 million, which is the poorest of the 15 ex-Soviet republics, was shattered last month by a riot led by a former deputy defence minister, Abdukhalim Nazarzoda. He was killed by security forces.
In the past few weeks authorities have arrested several dozen members of the opposition Islamic Renaissance Party, the only legal religious force in Tajikistan, accused of plotting the coup with Nazarzoda.
Additional reporting by Dmitry Solovyov and Olzhas Auyezov in Almaty; Writing by Maria Kiselyova and Dmitry Solovyov; Editing by Jack Stubbs and Richard Balmforth