Egypt's interim president, Adly Mansour, has enacted a new protest law that rights groups say will severely curtail freedom of assembly, and could prohibit the kinds of mass demonstrations that forced presidents Hosni Mubarak and Mohamed Morsi from power.

The law will force would-be protesters to seek seven separate permissions to take to the streets, and bans overnight sit-ins such as the Tahrir Square protests of early 2011. Activists will have to go to court to appeal against any rejected applications – a restriction lawyers argue will render legal demonstration almost impossible.

The law also bans any unsanctioned gatherings – either in public or in private – of 10 or more people, and will give the police the final say on whether a protest can take place. As a result, the law is deemed just as restrictive as a similar protest bill debated and later discarded under Morsi, whose own authoritarian instincts contributed to his downfall. His version – which was written by the same official – would have made demonstrators seek five separate permissions, instead of seven, but outlined more draconian punishments.

"This law brings Mubarak's era back," said Gamal Eid, the director of the Arabic Network for Human Rights Information and one of Egypt's leading human rights laws. Eid even argued that the new law compared unfavourably with repressive legislation drafted while Egypt was still a British protectorate.

"It's weird that the colonialists would have a law that is more just than the supposedly post-revolutionary one," he added.

The law has been the subject of fierce debate in Egypt, where activists see its enactment as a litmus test for democracy in the post-Morsi era.

Nineteen Egyptian rights groups signed a joint statement last week condemning the bill while it was being debated.

Human Rights Watch said the law "would effectively give the police carte blanche to ban protest in Egypt". HRW added that it "could severely restrict the freedom of assembly of political parties and nongovernmental groups" and was "an important indicator of the extent to which the new government is going to allow for political space in Egypt".

In the short-term, the law will particularly affect pro-Morsi supporters, who have mounted near-daily demonstrations in many Egyptian towns and cities since his removal in July, disrupting urban life. In Cairo on Sunday, traffic was brought to a standstill in several parts of the capital after pro-Morsi protests led administrators to lock down key areas.