KABUL, Afghanistan — At least 17 people were killed on Wednesday when militants said to be members of the Islamic State attacked a checkpoint on the Tajikistan-Uzbekistan border, the Tajik authorities said.

The attack points to the resilience of the Islamic State and its longstanding aim to spread further into Central Asia from its enclave in Afghanistan. It comes almost two weeks after the group’s leader, Abu Bakr al-Baghdadi, was killed during an American military operation in northwestern Syria. Western officials had warned that Mr. al-Baghdadi’s death was likely to lead to retaliatory attacks.

Fifteen assailants were killed in the gun battle in Tajikistan, as were a Tajik border guard and an employee of the country’s Interior Ministry. Five militants were captured, the ministry said in a statement.

The Islamic State has not taken responsibility for the clash, which occurred around 50 miles southwest of the capital, Dushanbe, but the Interior Ministry said that Tajik officials had learned of the group’s role during “the investigation and interrogation” of the captured fighters.