(Adds suicide bomber, background)
By Asma Alsharif and Maggie Fick
CAIRO, Jan 23 (Reuters) - A suicide bomber in a car blew himself up in the parking lot of a top security compound in central Cairo on Friday, killing at least four people in one of the most high-profile attacks on the state in months, security sources said.
The early morning explosion damaged the Cairo Security Directorate, which includes police and state security, and sent smoke rising over the capital, raising concerns that an Islamist insurgency is gathering pace.
The dead 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 was scattered hundreds of metres 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.
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 roadmap he said would bring elections and calm to Egypt.
But Islamist 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 Egypt 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.
The assault on police headquarters will likely encourage the state to crack down 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.
(Additional reporting by Shadia Nasralla; Writing by Michael Georgy; Editing by Nick Macfie)