(Adds details, colour, claim of responsibility)
By Mustafa Andalib
GHAZNI, Afghanistan, Sept 4 (Reuters) - Taliban insurgents detonated truck bombs and fired rocket-propelled grenades outside the office of Afghanistan's spy agency and a police compound in the central town of Ghazni on Thursday, killing 18 people, the provincial governor said.
More than 150 people were wounded in the attack, the biggest in recent weeks, as Afghanistan's leadership grapples with a political crisis and a security vacuum as most foreign troops prepare to leave the country.
Ghazni provincial governor Musa Khan Akbarzada said a group of 19 insurgents was involved in the simultaneous attacks on the local office of the National Directorate of Security and a quick reaction team housed in the police building.
The men armed with light machine guns drew up in trucks at a back gate of the NDS, the crack U.S.-trained agency leading the fight against the insurgency, and the police building early on Thursday and exploded their bombs.
"The bombs were so powerful that many civilians were wounded because of falling roofs and shattering of windows in their homes," Akbarzada said. Soon after, several of the attackers entered the NDS compound and fought a gunbattle with Afghan forces.
Dozens of the wounded were taken to a lone hospital in Ghazni where doctors were forced to treat many of them outside.
The attack in Ghazni, one of the provinces that surround the capital city of Kabul, is the latest in a series of offensives launched by the Taliban in the summer fighting season.
Insurgents have carried out complex attacks on government installations, including in Logar and Wardak provinces which are the gateways to the heavily guarded national capital.
TALIBAN CLAIM MAJOR SUCCESS
Taliban spokesman Zabihullah Mujahid claimed responsibility for the attack and said dozens of Afghan soldiers were killed.
"It is a success for us and failure to our enemies that they didn't even notice how our fighters in big numbers reached the intelligence agency with explosive-laden cars and carried out attacks," Mujahid said.
The attack on the NDS was the second in less than a week after a similar bombing in the eastern city of Jalalabad.
Afghan officials have in the past blamed such truck bombings near the capital and in Kabul itself on the Haqqani network, one of the deadliest Taliban factions.
The network based along the border with Pakistan is believed to be behind some of the most audacious attacks in Kabul including the bombing of the Indian embassy and the 2011 attack on the U.S. embassy.
A prolonged political deadlock over a disputed presidential election has added to anxiety over the threat posed by the Taliban once most foreign combat forces leave by the end of this year.
The troubled political transition has led to a prolonged delay in signing a security pact with the United States governing how many troops will remain. (Writing by Sanjeev Miglani and Hamid Shalizi,; Editing by Jeremy Laurence)