Kunduz, Afghanistan -Eight Afghan soldiers were killed on Tuesday while repelling a fierce Taliban attack on Kunduz, a strategic city in northern Afghanistan that had briefly fallen to the militants twice in the past, officials said.

Taliban fighters attacked several government posts on the outskirts of the city at around 1:00 am, a defence ministry statement said, triggering heavy fighting.

“With the support of air force their attack was repelled,” it said, adding the fighting lasted for several hours.

Defence Minister Assadullah Khalid, who visited Kunduz later on Tuesday, said the Taliban had “suffered big losses”. “Unfortunately, we have also lost eight brave soldiers,” he told reporters.

Three civilians were also killed and 55 others wounded in the overall violence that rocked the city, Kunduz provincial health director Ehsanullah Afzali said.

Both sides have clashed repeatedly in rural areas in recent months, but an attempt to enter a city as large as Kunduz is seen as a serious escalation.

The latest violence follows a declaration by President Ashraf Ghani last week to resume offensive strikes against the insurgents following a string of brutal attacks. The Taliban responded by vowing to increase assaults against Afghan security forces.

The insurgents managed to briefly capture an Afghan army post during Tuesday’s fighting but it was quickly retaken by security forces, army spokesman Hadi Jamal told AFP.

The defence ministry said 40 Taliban fighters were killed and 50 others wounded in the Kunduz assault.

Afghan officials and the Taliban frequently exaggerate claims of casualties.

The Taliban briefly captured Kunduz, a strategic city not far from the Tajikistan border, twice before -- in September 2015 and again a year later. An attempt last year failed.

- UN sees rise in

civilian deaths -

The latest attack on the city came a day after the Taliban killed at least seven Afghan intelligence personnel with a car bomb in the eastern province of Ghazni. bAnd last week, gunmen stormed a hospital in Kabul killing 24, including mothers and infants.

That attack, which triggered international outrage, was followed by a suicide bombing at a funeral which killed at least 32 mourners. The Taliban denied involvement in those attacks, although Ghani blamed the militants and the Islamic State group for the bloodshed. Officials say the assaults are part of the Taliban’s undeclared spring offensive. Violence has spiked since the Taliban signed a deal with Washington in February, under which Washington said it would pull its troops out of the country in return for security guarantees from the militants. Analysts say the Taliban have been emboldened by the accord and government officials have reported more than 3,800 attacks, which killed 420 civilians and wounded 906, since signing the deal.

The Taliban were responsible for 208 civilian casualties last month -- 25 percent more than April 2019 -- the United Nations Assistance Mission in Afghanistan (UNAMA) said in a statement.

It said civilian casualties attributed to Afghan security forces in April numbered 172, an increase of 38 per cent.

“Parties have committed to finding a peaceful solution and should protect the lives of all Afghans and not jeopardise people’s hope for an end to the war,” said Deborah Lyons, the UN Secretary-General’s Special Representative for Afghanistan.