CAIRO - 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.

The square was the birthplace of the revolt that toppled Mubarak almost three years ago. That uprising was led by liberal and secular youth groups, whose differences with the Islamists began to surface later in 2011 over claims that Morsi's Brotherhood and its allies were more interested in promoting their own political interests than pursuing the uprising's goals.

Sunday's Islamist protesters came from Cairo University, where they have been protesting the death on Thursday of an engineering student at the hands of police. Non-Islamist students were also protesting the death of the student on Sunday, but they restricted their demonstration to the area outside the Cairo University campus in the Giza district.

It was not immediately clear why police did not stop the protesters from reaching Tahrir, a 30-minute journey on foot from the university campus on the west bank of the River Nile. There was no police presence outside the campus either.

Jubilant Islamist students knelt down and offered a prayer of thanks as their march drew closer to Tahrir. Once there, they chanted slogans against the military and police and flashed the four-finger sign that commemorates the death of hundreds of Morsi supporters by security forces since a military coup ousted the Islamist president on July 3.

Morsi's supporters immediately relayed the news on social networks, calling on others to join them quickly and suggesting that camping out indefinitely in the iconic square would eventually topple the military-backed government.

Also on Sunday, Egyptian authorities ordered the release from police custody of prominent activist Ahmed Maher, founder of the revolutionary April 6 Movement, a main player in the 2011 revolt against Mubarak. Prosecutors, however, extended by 15 days the detention of another iconic figure from the 2011 uprising -- Alaa Abdel-Fattah.

Both men face accusations related to intensely publicized clashes on Tuesday between police and demonstrators protesting a clause in a new draft constitution enshrining the trial in some cases of civilians before military tribunals. Both Maher and Abdel-Fattah are accused of assaulting policemen during the protest in downtown Cairo.

Maher surrendered to police on Saturday. Abdel-Fattah was arrested at his home two days earlier.

Human Rights Watch on Sunday urged Egypt's military-backed government to immediately release from detention the five presidential aides. The New York-based advocacy group said in a statement that the five have been held at an undisclosed destination since July 3.

The five advisers still in detention are among nine presidential aides detained in July along with Morsi. The other four have been transferred to regular prisons and are facing criminal charges.

"What kind of roadmap is this where a military-backed government can brazenly disappear former presidential aides for 150 days without any explanation?" said Sarah Leah Whitson, Middle East and North Africa director at Human Rights Watch. She was referring to the roadmap for a post-coup return to democracy announced by military chief Gen. Abdel-Fattah el-Sissi when he toppled Morsi, Egypt's first freely elected president.

"Forcibly disappearing people for months on end doesn't inspire confidence that this government intends to follow the rule of law," she added. "The prolonged enforced disappearance of anyone is a crime, pure and simple. The Egyptian authorities should immediately free them unconditionally."

According to HRW, the five still held at a secret location are: Essam el-Haddad, Morsi's top foreign policy adviser, Ayman Ali, who advised him on the affairs of Egyptian expatriates, aide Ayman el-Serafy, media adviser Abdel-Meguid el-Meshaly and foreign affairs aide Khaled el-Qazzaz.