KABUL (AFP) - Eight people were killed and 17 wounded when prisoners in Kabul's main jail went on the rampage, setting fire to their beds and taking guards hostage, an Afghan minister said Friday. The inmates of the notorious Pul-e-Charkhi prison were protesting late Thursday against a move to search their cells for phones, knives and other weapons, deputy justice minister Mohammad Qasim Hashimzay told AFP. "As the prison guards went in for the search, they were attacked by the prisoners, and later we found eight prisoners dead, 12 prisoners and five police wounded," he said. Hashimzay said an investigation had been launched into how the deaths occurred at the prison, which is on the outskirts of Kabul and holds more than 3,000 inmates including between 400 and 500 Taliban suspects. Prisoners had contacted media earlier in the week complaining that dozens of inmates had been killed by police forces. "We managed to search the cells and it ended an hour ago. The prisoners had cell phones, knives and other tools they use as weapons," said Hashimzay. Pul-e-Charkhi prison also has a separate section, guarded by the Afghan army including some returned from the US detention facility at Guantanamo Bay. Inmates frequently complain about poor living standards and the behaviour of the prison guards, and the situation has led to hunger strikes and several stand-offs in recent years. In a similar clean-up operation in July, Afghan forces found more than 100 handmade knives and swords and dozens of petrol bombs. That search came after Taliban militants blasted open the main jail in the southern city of Kandahar on June 13 and hundreds of Taliban prisoners escaped.