The blast, during the Muslim holy month of Ramadan when tens of thousands of Afghans are fasting, is the latest in a spate of violence across the country despite a peace accord signed between the United States and Taliban in February.
The interior ministry in Kabul and provincial officials in Ghazni confirmed the attack.
“Around 4:30 a.m., a base of the National Security (NDS) forces in Ghazni was targeted by a car bomb,” said a police official, adding that seven people died at the blast site and 40 injured were taken to a military hospital.
Taliban spokesman Zabihullah Mujahid said fighters of the Islamist group were responsible for the attack in Ghazni, which has been the scene of many large-scale attacks by the Taliban in recent years against both Afghan and foreign forces.
Last week five civilians were killed and 40 people, including six soldiers, were wounded in a Taliban truck bomb blast targeting an army office in the neighbouring province of Paktia.
More about: Taliban