Egypt's public prosecutor resigned under pressure from his opponents in the judiciary, dealing a blow to President Mohamed Mursi and drawing an angry response on Tuesday from the Islamist leader's supporters in the Muslim Brotherhood.
Seeking to keep pressure on Mursi, the main opposition coalition staged protests against an Islamist-backed draft constitution that has divided Egypt but which looks set to be approved in the second round of a referendum on Saturday.
A few hundred protesters made their way through the streets of Cairo chanting "Revolution, revolution, for the sake of the constitution" and calling on Mursi to "Leave, leave, you coward".
But as the protest got under way, the numbers were well down on previous demonstrations.
Mursi obtained a 57 percent "yes" vote for the constitution in a first round of the referendum last weekend, state media said, less than he had hoped for.
The opposition, which says the law is too Islamist, will be emboldened by the result but is unlikely to win the second round, to be held in districts seen as even more sympathetic towards Mursi's Muslim Brotherhood.
Protesters broke into cheers when the public prosecutor appointed by Mursi last month announced his resignation late on Monday.
In a statement on its Facebook page, the Muslim Brotherhood, which propelled Mursi to power in elections in June, said the enforced resignation of public prosecutor Talaat Ibrahim was a "crime".
The Supreme Judiciary Council, which governs the country's judicial system, should refuse to accept the prosecutor's resignation, the Brotherhood said.
Further signs of opposition to Mursi emerged when a judges' club urged its members not to supervise Saturday's vote. But the call is not binding and balloting is expected to go ahead.
If the constitution passes next weekend, national elections can take place early next year, something many hope will help end the turmoil that has gripped Egypt since the fall of Hosni Mubarak nearly two years ago.
The National Salvation Front opposition coalition said there were widespread voting violations in the first round and called for protests to "bring down the invalid draft constitution".
The Ministry of Justice said it was appointing a group of judges to investigate complaints of voting irregularities around the country.
Opposition marchers headed for Tahrir Square, cradle of the revolution that toppled Mubarak, and Mursi's presidential palace, still ringed with tanks after earlier protests.
A protester at the presidential palace, Mohamed Adel, 30, said: "I have been camping here for weeks and will continue to do so until the constitution that divided the nation, and for which people died, gets scrapped."
The build-up to the first round of voting saw clashes between supporters and opponents of Mursi in which eight people died. Recent demonstrations in Cairo have been more peaceful, although rival factions clashed on Friday in Alexandria, Egypt's second biggest city.
On Monday evening, more than 1,300 members of the General Prosecution staff gathered outside the public prosecutor's office, demanding Ibrahim leave his post.
Hours later, Ibrahim announced he had resigned. The crowd cheered "God is Great! Long live justice!" and "Long live the independence of the judiciary!" witnesses said.
The closeness of the first-round referendum vote and low turnout give Mursi scant comfort as he seeks to assemble support for difficult economic reforms.
"This percentage ... will strengthen the hand of the National Salvation Front and the leaders of this Front have declared they are going to continue this fight to discredit the constitution," said Mustapha Kamal Al-Sayyid, a professor of political science at Cairo University.
Mursi is likely to become more unpopular with the introduction of planned austerity measures, polarising society further, Sayyid told Reuters.
To tackle the budget deficit, the government needs to impose tax rises and cut back fuel subsidies. Uncertainty surrounding economic reform plans has already forced the postponement of a $4.8 billion loan from the International Monetary Fund. The Egyptian pound has fallen to eight-year lows against the dollar.
Mursi and his backers say the constitution is needed to move Egypt's democratic transition forward. Opponents say the document is too Islamist and ignores the rights of women and of minorities, including Christians who make up 10 percent of the population.
Demonstrations erupted when Mursi awarded himself extra powers on Nov. 22 and then fast-tracked the constitution through an assembly dominated by his Islamist allies and boycotted by many liberals.
The referendum has had to be held over two days because many of the judges needed to oversee polling staged a boycott in protest. In order to pass, the constitution must be approved by more than 50 percent of those voting.