DUSHANBE/ASHGABAT - US Secretary of State John Kerry sought on Tuesday to reassure the rulers of Tajikistan and Turkmenistan that Washington remained committed to Central Asia’s security, even though it is withdrawing troops from neighbouring Afghanistan.

Both countries fear the spread of the militancy, and US officials worry that government crackdowns will backfire and bring greater instability.

Kerry met Tajik President Imomali Rakhmon in Dushanbe and Turkmen President Kurbanguly Berdymukhamedov in Ashgabat on Tuesday.

“I emphasized the United States’ commitment to work with Tajikistan and other countries ... to strengthen border security,” Kerry told reporters after the talks with Rakhmon.

The two visits come on the last day of Kerry’s tour of Central Asia. He made stops in all five of the region’s former Soviet republics, in an effort to show that Washington intends to stay engaged as Russia, fresh from forays into Ukraine and Syria, reasserts itself.

US officials hope Central Asian leaders will see President Barack Obama’s decision last month to slow the pace of US withdrawal from Afghanistan as proof that Washington is not abandoning them. Kerry’s trip was also meant to show that the United States wants to deepen not only security cooperation but also economic ties. At the same time, Kerry emphasized in the Kazakh capital, Astana, on Monday that Central Asian governments must not use fears of extremism as an excuse to crack down on dissent or as a “license to use violence indiscriminately.” Either would only radicalize more people, he said.

US officials are especially concerned about Tajikistan. During the summer, Rakhmon’s government banned the only official Islamist political party in former Soviet Central Asia. Last month, authorities arrested almost two dozen of its members.

Before Kerry’s trip, a senior US official noted that men with the traditional long beards of devout Muslims have faced “particular persecution” in Tajikistan, something that has drawn criticism from international rights groups.

The difficulties and challenges involved in counter-terrorism and the fight against violent extremism needed to be balanced with human rights and religious freedom, Kerry said.

The apparent defection this year of a police chief to Islamic State has unnerved Tajik authorities, but the US official said there had been no signs of his involvement in militant activity in the country since then.

Tajikistan hosts a Russian military base and a senior Russian official said last month Moscow could re-establish security operations to guard the Tajik-Afghan border, the role it had played until 2005, when an agreement with the Tajik government lapsed and Russian troops pulled out.

Like Tajikistan, Turkmenistan’s human rights record is widely criticized. Berdymukhamedov has run the country with an iron grip since taking over in 2006. But he has also taken a course more independent of Moscow, opening the way for it to be courted by the United States.

Kerry, the first US secretary of state to visit Turkmenistan since James Baker in 1992, said after the talks with Berdymukhamedov they had discussed the “human dimension” as well as security.

“We have concerns (about Afghanistan) that we need to work on together,” he told reporters, adding that Ashgabat and Washington would sign a memorandum of understanding on “strategic security”. He did not elaborate.

Kerry’s trip to Central Asia followed warnings from Russian officials about the danger of Islamist militants infiltrating the region from Afghanistan, accompanied by hints Moscow will respond by beefing up its military presence.

Though Russian officials say they are driven only by concern about militants, not geo-political rivalry, their heightened attention risks fuelling US suspicions that Moscow is trying to rebuild its old empire.

Unlike other Central Asian leaders, Berdymukhamedov snubbed the meeting of ex-Soviet presidents in Kazakhstan last month where they discussed the Afghan threat. His foreign minister Rashid Meredov did not go either, having flown to Washington on the eve of the meeting.

Turkmenistan also denounced as untrue a remark by Kazakh President Nursultan Nazarbayev who said he was aware of “incidents” that had happened at the Afghan-Turkmen border.