The dead from the first blast included three policemen, security sources said. State television quoted the Cairo governor as saying 50 people were wounded.
Reuters witnesses heard gunfire immediately after the blast, which twisted the metal and shattered windows of nearby shops. Wood and metal debris were scattered hundreds of meters around. One body covered in a blanket lay in a pool of blood near a scorched car engine.
State television quoted witnesses as saying gunmen on motorcycles opened fire on buildings after the explosion.
There was no immediate claim of responsibility for the attack, which came a day before the third anniversary of the uprising that toppled autocrat Hosni Mubarak and raised hopes of a stable democracy in the Arab world's biggest nation.
Instead, relentless political turmoil and street violence have hit investment and tourism hard.
Militant attacks on the rise
After toppling President Mohamed Mursi of the Muslim Brotherhood last July after mass protests against his rule, army chief General Abdel Fattah al-Sisi unveiled a political road map he said would bring elections and calm to Egypt.
Security forces have killed hundreds of Brotherhood members and jailed thousands more, including top leaders.
The army-backed government has effectively removed the movement from politics and many Egyptians turned against the Brotherhood after Mursi's troubled one-year rule.
But authorities are struggling to contain Islamist militant violence. Militants based in the Sinai have stepped up attacks on security forces since Mursi's fall, killing hundreds, and Egypt's political transition has stumbled.
Attacks in other parts of Egypt have also been rising, raising fears the country could face an Islamist insurgency similar to one that raged in the 1990s before Mubarak stamped it out.
In December, a Sinai-based Islamist militant group, Ansar Bayt al-Maqdis,said it was behind a car bomb attack on an Egyptian police compound in the Nile Delta which killed 16 people and wounded about 140.
On Thursday, gunmen killed five policemen at a checkpoint south of Cairo,the Interior Ministry said.
Prime Minister Hazem el-Beblawi condemned the Cairo Security Directorate attack in a statement, saying it was an attempt by "terrorist forces" to derail the political road map which was, nevertheless, being implemented "firmly".
The assault on police headquarters will likely encourage the state to crackdown harder on the Brotherhood, which it accuses of carrying out terrorist acts.The Brotherhood says it is a peaceful movement.
The mood was tense at the site of Friday's blast. "Traitors and dogs!" yelled onlookers, an apparent reference to the assailants.
People also chanted anti-Brotherhood slogans. "The people want the execution of the Brotherhood. Execution for Mursi," they yelled.
Wafaa Ahmed cried outside the Cairo Security Directorate. "These people have no sense of loyalty to the nation. This is terrorism,they want to get back at us because we finished them off ...," she said. "Something like this will only make the people stronger and more determined."