* Opposition stages protests in Cairo
* Demonstrations against Islamist-backed constitution
* Prosecutor quits, angering Brotherhood
Opponents of Egyptian President Mohamed Mursi staged protests in Cairo on Tuesday against an Islamist-backed draft constitution that has divided Egypt but looks set to be approved in the second half of a referendum this weekend.
Several hundred protesters outside the presidential palace chanted "Revolution, revolution, for the sake of the constitution" and called on Mursi to "Leave, leave, you coward!". While the protest was noisy, numbers were down on previous demonstrations.
Mursi obtained a 57 percent "yes" vote for the constitution in the first part 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 encouraged by the result but is unlikely to win the second part this Saturday, which is to be held in districts seen as even more sympathetic towards Mursi's Muslim Brotherhood.
The National Salvation Front opposition coalition said there were widespread voting violations last Saturday and called for protests to "bring down the invalid draft constitution".
The Ministry of Justice said it was appointing judges to investigate complaints of voting irregularities.
Opposition marchers converged on Tahrir Square, cradle of the revolution that toppled Hosni Mubarak almost two years ago, 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 day 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.
Egypt's public prosecutor resigned under pressure from his opponents in the judiciary, dealing a blow to Mursi and drawing an angry response from his supporters in the Muslim Brotherhood.
In a statement on its Facebook page, the Islamist group that propelled Mursi to power in an election in June, said the enforced departure of public prosecutor Talaat Ibrahim was a "crime" and authorities should not accept the resignation.
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 is passed, national elections can take place early next year, something many hope will help end the turmoil that has gripped Egypt since the fall of Mubarak.
The closeness of the first 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, Sayyid told Reuters.
To tackle the budget deficit, the government needs to raise taxes and cut 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.