The United States will continue air strikes in support of Afghan forces fighting the Taliban, a top US general said Sunday, as the insurgents press on with offensives across the country.

Since early May, violence has surged after the insurgents launched a sweeping assault just days after the US-led foreign forces began their final withdrawal which is now almost complete.

The Taliban's deadly assault has seen the insurgents capture scores of districts, border crossings and encircle several provincial capitals.

"The United States has increased air strikes in the support of Afghan forces over the last several days, and we are prepared to continue this heightened level of support in the coming weeks if the Taliban continue their attacks," General Kenneth McKenzie, head of the US Army Central Command, told reporters in Kabul.

McKenzie acknowledged that there were tough days ahead for the Afghan government.

"The Taliban are attempting to create a sense of inevitability about their campaign. They are wrong," he said.

"Taliban victory is not inevitable," he said, adding the US military will continue giving logistical support to Afghan air force even after the end of August 31 when all foreign forces are expected to leave.

"We will continue to support the Afghan forces even after that August 31 date, it will generally be from over the horizon," McKenzie said.

Violence has surged across several provinces including in Kandahar after the Taliban launched a sweeping offensive
Violence has surged across several provinces including in Kandahar after the Taliban launched a sweeping offensive AFP / JAVED TANVEER

Experts say a key factor that helped the Taliban in seizing vast swath of territory in a short time was the lack of regular air support from US forces to Afghan troops.

But on Sunday McKenzie vowed to support Afghan air force going forward, and that the US air force will also retain ability to "strike into Afghanistan" against two other jihadist groups the Islamic State (IS) and Al-Qaeda.

McKenzie said it will be clear in the next "days and weeks" if the Afghan government will be able to defend the country from the Taliban.

"I don't think it's going to be an easy path .. (but) I do not accept the narrative that there is going to be a civil war of necessity," he said.

McKenzie's remarks came as about 22,000 families were displaced by the fighting in the past month in the southern city of Kandahar itself.

"They have all moved from the volatile districts of the city to safer areas," Dost Mohammad Daryab, head of the provincial refugee department, told AFP.

A night curfew was imposed across 31 of the country's 34 provinces to curb surging violence
A night curfew was imposed across 31 of the country's 34 provinces to curb surging violence AFP / HOSHANG HASHIMI

On Sunday, fighting continued on the outskirts of Kandahar city, and McKenzie acknowledged that US air force had carried out air strikes in the province in recent days.

Kandahar resident Hafiz Mohammad Akbar said his house had been taken over by the Taliban after he fled.

"They forced us to leave... I am now living with my 20-member family in a compound with no toilet," said Akbar.

Residents expressed concerns the fighting might increase in days ahead.

"If they really want to fight, they should go to a desert and fight, not destroy the city," said Khan Mohammad, who moved to a camp with his family.

"Even if they win, they can't rule a ghost town."

Kandahar, with its 650,000 inhabitants, is the second-largest city in Afghanistan after Kabul.

The southern province was the epicentre of the Taliban's regime when they ruled Afghanistan between 1996 to 2001.

Ousted from power in a US-led invasion in 2001 after the September 11 attacks, the Taliban have spearheaded a deadly insurgency that continues to this day.

Their latest offensive launched in early May has seen the group take control of half of the country's about 400 districts.

Global rights group Human Rights Watch said there were reports the Taliban were committing atrocities against civilians in areas they had captured, including in the town of Spin Boldak near the border with Pakistan they took earlier this month.

"Taliban leaders have denied responsibility for any abuses, but growing evidence of expulsions, arbitrary detentions, and killings in areas under their control are raising fears among the population," said Patricia Grossman, associate Asia director at HRW said in a statement.

The authorities meanwhile announced they had arrested four men they said belonged to the Taliban, accusing them of carrying out this week's rocket attack on Kabul.

At least three rockets landed near the palace on Tuesday as President Ashraf Ghani and his top officials performed outdoor prayers to mark the start of the Muslim holiday of Eid al-Adha.

The attack was however claimed by IS.