Before detonating their vehicle, as many as six militants inside the car stepped outside and engaged troops in an intense shootout, according to the police. All six attackers were reported to have been killed.
Residents said the blast could be heard from kilometres away.
No group immediately claimed responsibility, though suspicion is likely to fall on separatists who often target civilians and security forces in insurgency-plagued Balochistan, where Quetta is the provincial capital.
Provincial health minister Bakhat Kakar said the death toll could rise further.
Kakar told reporters the attackers had targeted the security forces' headquarters, but most of those killed and injured were civilians.
Interior Minister Mohsin Naqvi said six attackers were involved in the assault and all of them were killed by the security forces.
Mohammad Usman, who lives near the paramilitary headquarters, said Tuesday's blast shook the entire neighbourhood.
"The windowpanes of my house shattered, and part of the building was damaged, but thanks to God we are all safe," he said.
Local television channels and CCTV footage from the site of the explosion showed images of a car stopping in front of the gate of the paramilitary compound.
In Islamabad, Pakistan's President Asif Ali Zardari and Prime Minister Shehbaz Sharif denounced the bombing and praised security forces for quickly responding to the attack and eliminating the attackers.
Balochistan Chief Minister Sarfraz Bugti also condemned the attack, saying security forces returned fire and killed all the assailants involved in the deadly attack in the city.
"Terrorists cannot break the nation's resolve through cowardly acts, and the sacrifices of our people and security forces will not go in vain," Bugti said in a statement.
He said his government remains committed to making the province a peaceful and secure place.
The attack comes weeks after a suicide bombing outside a stadium near Quetta as supporters of a nationalist party were leaving a rally, killing at least 13 people and wounding 30 others.
with EFE