Police fired tear gas to drive hundreds of supporters of Egypt’s ousted Islamist president from Cairo’s famed Tahrir Square on Sunday, as a panel tasked with amending the constitution adopted during his time in office agreed on changes to the text.

The 50-member panel revising the Islamist-tilted charter adopted under former President Mohammed Morsi managed to resolve its differences after two days of clause-by-clause voting on the final draft.

The text gives women and Christians “suitable representation” but says a future law must decide the details. It also calls for elections, either parliamentary or presidential, within 90 days after the draft constitution is adopted. The other election should be held up to six months later.

The new charter would require future presidents to declare their financial assets annually, and allows lawmakers to vote out an elected president and call for early elections if they have a two-thirds majority.

Members agreed that a contentious proposed article allowing military tribunals for civilians would be scaled back, allowing them only in case of direct attack on military personnel or assets.

Rights activists had previously objected to the military’s trial of some 10,000 civilians when it ran the country during the 17 months after Egypt’s 2011 revolt that ousted longtime autocrat Hosni Mubarak.

The document is now to be handed over to interim President Adly Mansour, who has a month to call for a nationwide referendum on it.

If adopted by the public, a giant step in the roadmap announced by the military when it removed Morsi last summer will have been completed.

Morsi supporters have been staging near daily protests to demand his reinstatement, in Cairo and across much of the country. But for hundreds of them to enter and take over Tahrir, even briefly as they did Sunday, constituted a major, albeit symbolic, propaganda coup for them. They would have attracted many more like-minded protesters had they been able to gain a solid foothold in the square.

It was the first time in more than a year that Islamists entered the central square in significant numbers. The location has been the near exclusive domain of liberal and secular protesters since shortly after Morsi took office in June 2012 as Egypt’s first freely elected president.

Also in the background to Sunday’s events was scathing criticism of the military-backed government by a top rights group that called on authorities to immediately release five Morsi aides who have been kept at an undisclosed destination since their arrest on July 3, the day Morsi was ousted.

Police in Tahrir acted quickly and appeared to surprise protesters, firing heavy tear gas to clear them from the central plaza barely minutes after they took it over and sending them to take refuge in side streets. After an initial salvo of some two dozen canisters, armored police vans rushed to the square with sirens wailing.

Later, six army armored personnel carriers arrived. After nightfall, the protesters and police fought pitched battles on side streets off Tahrir and in the downtown area, with police firing tear gas and the protesters pelting them with rocks.