GHAZNI: More than 350 inmates have escaped after an attack by Afghan Taliban insurgents on the main prison in eastern Ghazni province early on Monday, an Afghan official said.

Deputy provincial governor of Ghazni Mohammad Ali Ahmadi said 352 inmates escaped after the attack but the Afghan interior ministry said up to 400 managed to flee.

Ahmadi said that insurgents wearing military uniforms launched a well-organised attack to free the inmates.

"Around 2:30am six Taliban insurgents wearing military uniforms attacked Ghazni prison. First they detonated a car bomb in front of the gate, fired an RPG and then raided the prison," Ahmadi told AFP.

The deputy provincial governor of Ghazni said the attack, which was started by a suicide bomber, then allowed other insurgents to get inside the compound.

Ahmadi said four police guards were killed and seven others were wounded, and that three insurgents were also killed in the early morning battle.

A Reuters reporter at the scene saw the bodies of two men who appeared to be suicide bombers and a blown-up car that had apparently been used to destroy the main entrance of the jail.

Baz Mohammed Hemat, head of the civilian hospital in Ghazni city, said 14 wounded people — 10 security forces, and four inmates — had been brought to the facility for treatment.

Taliban spokesman Zabihullah Mujahid claimed responsibility for the attack in an email to the media.

"In this operation, 400 of our innocent countrymen were freed... and were taken to mujahideen-controlled areas," the spokesman said.

Security officials would not confirm how many prisoners were in the jail.

The Taliban said they sprang the inmates from the Kandahar prison through a one-kilometre tunnel that took five months to dig, and claimed all those who escaped belonged to the militia, including more than 100 commanders.

The Taliban, who launched a countrywide summer offensive in late April, are known to exaggerate and distort their public statements.

The insurgents are stepping up their summer offensive amid a simmering leadership succession dispute after the confirmation of longtime chief Mullah Omar's death.

Mullah Akhtar Mansour, a trusted deputy of Omar, was named as the insurgents' new chief in late July, but the power transition has been acrimonious.

Afghan security forces, stretched on multiple fronts, are facing their first fighting season without the full support of US-led Nato forces.

Nato ended its combat mission in Afghanistan last December and pulled out the bulk of its troops although a 13,000-strong residual force remains for training and counter-terrorism operations.

Afghanistan's president implored international donors earlier this month for their continued support, saying the "wounded country" faced a host of security and economic challenges.

Also read: US drone strike kills four suspected terrorists in Afghanistan