The headquarters of Egypt's Muslim Brotherhood have been burned and ransacked following an all-night siege – one day after millions protested on Egypt's streets calling for President Mohamed Morsi's resignation.

In an episode reminiscent of the sacking of Hosni Mubarak's political headquarters during Egypt's 2011 uprising, around 50 anti-Brotherhood protesters spent the night attacking the compound – situated on a rocky, isolated outcrop in east Cairo – with molotov cocktails, causing a series of small fires and explosions.

With police nowhere to be seen, Brotherhood cadres returned fire, killing at least four, and injuring at least 80 – according to medics at the scene.

Both sides told the Guardian that the other had started the battle, which began at around 7pm on Sunday. It was not possible to verify either claim.

At roughly 7am, after 12 hours of fighting, Brotherhood reinforcements arrived – possibly, bystanders said, because one of the fires had grown too big, and those inside now feared being smoked out. The reinforcements covered their colleagues' exit with live fire – the Guardian later saw bullets being plucked from the wall. Bystanders said that some Brotherhood members were injured and handed to the authorities during the blaze.

Once the other Brotherhood members fled, protesters stormed the compound and accelerated the blaze. Firefighters said they arrived at 9am – too late to save the building, which is now charred and still filled with smoke. Once the worst of the fire was put out, hundreds re-entered the building, looting and destroying its remaining features.

"It's a great feeling. I've wanted to do this for three years," said Ahmed Yassin, a student from Alexandria, holding the office nametag of Mohamed el-Badie, the Brotherhood's leader. "Their offices are being trashed all over Egypt – but this was the most important, because they are running the country from this office."

Opponents of the Brotherhood detest the organisation because it is perceived to unduly influence Morsi, a political associate, and because it seeks to impose too narrow a vision of Islam on Egyptian society.

On Monday morning, men and women were still taking away air-conditioning units, safes, sinks, and filing cabinets – as well as the copper nametags of Khairat al-Shater, the Brotherhood's most powerful figure, and Badie.

Inside, there was chaos, with black smoke still billowing through the upper rooms, and looters fighting over the spoils. Outside, a crowd of 200 chanted "the people demand the fall of the regime", indicative of the view that the Brotherhood has seized control of most of the state.

The Brotherhood itself believes that though Mohamed Morsi is a sympathiser, the state is still controlled by officials loyal to ousted dictator Hosni Mubarak.

The scene at the headquarters was a microcosm of the extreme polarisation affecting Egyptian society, which is divided between those who may be religious, but do not seek an Islamic state – and Islamists like the Brotherhood, which seeks to use the concepts of Islamic law to govern Egypt. Even state institutions appear to have been drawn into the division. The police, who defended the same building during a similar attack in March, did not intervene on Sunday.

"I feel victorious," said Ahmed Badawy, a Cairo resident shot in the hand by birdshot fired by Brotherhood members during the night. "But we'll only have truly won once Morsi leaves."

Additional reporting by Mowaffaq Safadi