Fifteen jihadists were killed in Tajikistan Wednesday during an attack on a border post that officials blamed on members of the Islamic State group who crossed over from Afghanistan.

The overnight assault, carried out not far from the Tajik capital Dushanbe, also left a soldier and policeman dead, authorities in the ex-Soviet republic said.

It was the latest bout of jihadist violence to shake the mountainous and impoverished Central Asian nation, which has been battling an Islamist insurgency.

The interior ministry said about 20 armed assailants attacked the Ishkobod border post some 50 kilometres (30 miles) west of Dushanbe at 3:23 am local time.

Clashes erupted and "15 members of an armed criminal group were neutralised and four more attackers detained," the ministry said in a statement.

The interior ministry released photographs showing the bodies of several black-clad men on the ground next to a burnt-out vehicle at the scene of the clash, with automatic rifles lying nearby.

The border guard service said that captured assailants had admitted to crossing illegally into the country from Afghanistan on Sunday.

Photo: AMAQ NEWS AGENCY / Handout

"All are members of the so-called 'Islamic State' terrorist group," the service said in a statement.

Tajikistan, a country of nine million bordering Afghanistan and China, has been hit by conflicts since it gained independence with the collapse of the Soviet Union in 1991.

Tens of thousands were killed during a five-year civil war in the 1990s when rebel groups including Islamists rose up against the government.

Photo: POOL / WU HONG

In recent years the majority-Muslim country has struggled with a rise in Islamic extremism.

Authorities have said that more than 1,000 Tajiks joined Islamist fighters in Syria and Iraq in recent years.

The most famous IS recruit from Tajikistan was Gulmurod Halimov, who headed the interior ministry's special forces unit before sensationally announcing his defection to IS in a video attributed to the group in 2015.

In May, at least 32 people were killed in a prison riot in Tajikistan, including 19 members of IS and several guards.

In July last year, an attack on foreign cycling tourists claimed by IS left four dead and two injured.

Rakhmon came to power during the civil war in the early 1990s and maintains a strong grip on the country.

He was in Switzerland on Wednesday and due to travel to Paris later in the week to meet with French President Emmanuel Macron.

Border areas in Central Asia are the scene of frequent clashes, with a series of recent deadly flare-ups on the contested frontier between Tajikistan and neighbouring Kyrgyzstan.

Tajikistan also shares 1,344 kilometres (835 miles) of border with Afghanistan, the world's largest producer of opium and heroin.

Incidents on the border frequently include shootouts and kidnappings of Tajiks by Afghan smugglers who then swap them for arrested traffickers.

ab-mm/as/wdb