* Battle over judiciary has polarised politics
* Islamists say judiciary filled with Mubarak-era appointees
* Opposition against draft law forcing retirement of judges
Egyptian President Mohamed Mursi has pledged to respect the independence of the judiciary amid an outcry over plans by his Islamist allies to purge thousands of judges.
After emergency talks with the Supreme Judicial Council and the prosecutor general on Monday, Mursi's office issued a late-night statement saying the president considered protecting the independence of the judiciary was his constitutional duty.
"The president confirmed definitively that he... does not accept any violation of the judiciary or insults against personalities of the judiciary, and that he strives in all of his decisions to stick to the constitution and the law and to respect the rulings of the judiciary," it said.
The opposition had condemned a draft law that would impose mandatory retirement on judges at 60 instead of 70, forcing out many senior judges who have angered the Islamists by annulling election laws and acquitting officials of ousted former President Hosni Mubarak's regime.
The statement from Mursi's office did not say whether the divisive judicial reform law proposed by the moderately Islamist Wasat Party would go through the upper house of parliament on Wednesday as previously planned.
But quoting a senior parliamentary source, the state-run Al-Ahram newspaper reported that the Muslim Brotherhood's Freedom and Justice Party, which controls the parliament, would not allow the law to pass.
Sobhi Saleh, a senior FJP lawmaker, told Al Jazeera's Egyptian news channel no session had been set to discuss a law he described as no more than a proposal.
The opposition National Salvation Front said on Monday the law would eliminate more than 3,000 judges at a stroke, calling it prelude to the "Brotherhoodisation" of the judiciary, and called for demonstrations outside parliament.
Egyptian judges are to hold another meeting on Wednesday over the law. Attendees said the judges asked that any legislation affecting the judiciary be sent to them for review before it is ratified.
The presidency statement said only: "Regarding the draft law in the Shura Council (upper house), the president confirmed his confidence that each branch (of government) will carry out its duty towards the nation... and that he is keen to separate between the branches without interfering in their affairs."
"PURIFICATION" OR PURGE
Mekky tendered his resignation on Saturday after the Muslim Brotherhood staged a big demonstration on Friday to demand a "purification" of the judiciary, seen as infested with Mubarak-era appointees hostile to Egypt's 2011 democratic revolution.
The constitutional court has repeatedly stymied Mursi's legislative and election plans, and appeals courts have acquitted or released some former Mubarak officials charged with corruption and abuses of power.
The clash highlights rival sources of legitimacy that have co-existed uneasily in Egypt since the Arab Spring street protests that toppled Mubarak. Most of the laws and judges date back to his authoritarian rule and some have been used to frustrate the plans of new bodies elected since the uprising.
Mubarak and his former interior minister were sentenced to life imprisonment last year for complicity in the killing of hundreds of demonstrators during the revolution, but an appeals court threw out the verdict in January and ordered a retrial, which has already stalled once and is due to start on May 11.
Two courts have ordered Mubarak's release since he has served the maximum permitted time in pre-trial custody, but the authorities have kept him in jail because he is facing other charges for which the detention term has not yet expired.
The battle over the judiciary has become the main obstacle to efforts by the United States, the European Union and the International Monetary Fund to promote political reconciliation to help Egypt fight a deep economic crisis.
Mursi has said he plans a cabinet reshuffle, likely to be announced early next week, that could create a more inclusive, politically neutral government and enable the NSF to abandon a planned boycott of parliamentary elections due later this year.
However, the attempt to purge the judiciary has polarised Egyptian politics again, deepening opposition suspicions that the Brotherhood wants to monopolise rather than share power.