Media playback is unsupported on your device Media caption The BBC's David Loyn says "a huge humanitarian crisis" is now unfolding in Kunduz

The Afghan government has launched a major offensive against Taliban forces near the north-eastern provincial capital of Kunduz.

The Taliban have come close to the city in recent fighting, leaving it cut off and displacing tens of thousands.

A BBC correspondent who has flown into Kunduz has heard gunfire and artillery exchanges not far from its centre.

Afghan officials say foreign jihadists trained by the Islamic State (IS) group are fighting alongside the Taliban.

Provincial governor Mohammed Omer Safi told the BBC that the bodies of 18 foreign fighters, including three Chechen women, had been found.

Security forces and Taliban have been involved in a stand-off for about a week after the insurgents launched an offensive on Kunduz at the end of April.

The insurgents are currently said to be massed in the Gul Tepa district on the southern outskirts of the city.

At the scene: David Loyn, BBC News, Kunduz

This is the first positive confirmation by a senior government official that Islamic State is operating alongside the Taliban in Afghanistan.

Until now, particularly in the south of the country, IS fighters have often clashed with the Taliban. But the governor said that the battle for the north is different, and here IS fighters are "supporting the Taliban, training the Taliban, trying to build the capacity of the Taliban for a bigger fight".

And, he said, they were more violent because they wanted to die in battle as martyrs.

As well as from Afghanistan's immediate northern neighbours, Tajikistan, Uzbekistan, and Kyrgyzstan, the dead came from Chechnya and Turkey. They were wearing black headbands marked with the same Islamic verses used by IS in Syria and Iraq.

Battle heralds militant tie-up

Image copyright Reuters Image caption Security forces have been in a stand-off with the Taliban for almost a week

Image copyright Reuters Image caption Until now they have struggled to expel the Taliban from the area

Correspondents say the advance is the most serious threat to a provincial capital in years.

Afghan army and police are involved in the fighting but there is no substantial help from foreign troops.

The BBC's David Loyn in Kunduz says Afghan forces are thinly spread in this region, and as well as this determined assault on Kunduz the Taliban and their allies have also attacked remote outposts in the mountains of Badakhshan further east.

Reports said at least 13 police were killed in the attacks.

Governor Safi said the Afghan forces in Kunduz did not have enough air power and their helicopters lacked the armaments they should have.

Only a few thousand Nato troops remain in the country, largely in training roles, after their combat mission ended in December. They have turned down several requests to assist with air strikes.

People displaced by the fighting are spread across the city and rural areas of the province of Kunduz.

The prolonged fighting could lead to a bigger problem if there is a failure to bring in the harvest this month, our correspondent says.

Kunduz supplies half of Afghanistan's rice crop, so delays could have a far-reaching impact, he adds.

International aid agencies are trying to assist the displaced, with the World Food Programme preparing emergency kits of flour, pulses, cooking oil and high-energy biscuits for 500 families, spokesman Wahiddullah Amini told Reuters news agency.