Egypt politicians condemn violence in Al-Azhar meeting
Leaders from prominent Egyptian political factions have met in the country's highest seat of Islamic learning to sign an agreement condemning violence.
The meeting at the al-Azhar mosque was attended by President Morsi's Muslim Brotherhood and by opposition figures.
Opposition politician Mohamed ElBaradei said after the meeting that he was "optimistic".
Nearly 60 people have been killed in Egypt in unrest in the past week.
The politicians, along with activist groups and leaders from Egypt's Coptic Christian Church, were invited to the talks by Sheikh Ahmed el-Tayyib, grand imam of al-Azhar.
The past week has seen the worst violence since President Mohammed Morsi won the presidency in June. The unrest began in Cairo on the eve of last Friday's second anniversary of the 2011 revolution and has spread to several cities.
The worst of the violence has been in the Suez Canal city of Port Said, in protests sparked by death sentences handed down to 21 local people accused of participating in football riots.
A curfew Mr Morsi imposed in Port Said and the cities of Suez and Ismailiya was widely ignored, with tens of thousands of residents taking to the streets. The curfew was relaxed on Wednesday.
On Tuesday, Egyptian army chief Gen Abdul Fattah al-Sisi warned that the political crisis could lead to the collapse of the state.
The meeting is a significant move and it is not the first time that al-Azhar, a highly-respected Sunni Muslim institution, has intervened to help solve a political crisis, the BBC's Yolande Knell reports from Cairo.
The document signed by the leaders refers to the "sanctity of [citizens'] blood and of public and private property", according to a text published by the Egyptian al-Ahram newspaper.
It says those signing "condemn the inciting of violence, its justification... and its exploitation in any form".
It also reminds state security forces of their "duty to protect citizens' safety and uphold their rights and constitutional freedoms".
"Whatever our differences are, they should be solved peacefully," Mr ElBaradei said in a press conference after the al-Azhar meeting on Thursday.
"There is an agreement, but definite steps should be implemented."
Saad al-Katatni, leader of the Muslim Brotherhood's Freedom and Justice Party, described the meeting as "historic" and stressed the need for continued dialogue.
Earlier this week, the National Salvation Front, formed by Mr ElBaradei, leftist Hamdeen Sabahi and former Foreign Minister Amr Moussa, turned down an invitation to talks with Mr Morsi.
They said they first wanted him to commit to the idea of a national unity government and a body to look at amendments to the new Egyptian constitution.
However, opposition groups are continuing to call for a mass protest in Cairo's Tahrir Square for what they are calling the Friday of Salvation, to oppose the president and the Muslim Brotherhood, our correspondent reports.
The opposition accuses Mr Morsi of betraying the revolution which overthrew President Hosni Mubarak after three decades in power.
They say Mr Morsi has failed to hold former officials accountable for alleged crimes and has consolidated power in the hands of his own Muslim Brotherhood, accusations the president denies.