UN officials, including Secretary-General Ban Ki-moon, have been urging Palestinian factions for some time to put their differences behind them, put national interest first and find a way forward so they can address the many challenges they face.

Hamas, which does not recognize Israel’s right to exist, took control of the Gaza Strip in 2007 after ousting the Fatah party of the Palestinian Authority President Mahmoud Abbas that controls parts of the West Bank.

On Wednesday, representatives of Hamas and Fatah announced that they struck a deal to form a national unity government and hold elections within a year.

“Reunification is essential for achieving a two-state solution that should be reached through negotiations,” Robert Serry, the UN Special Coordinator for the Middle East Peace Process, said in a statement issued in Jerusalem.

Mr. Serry “notes with much interest” the agreement announced in Cairo, the statement added. “He hopes that reconciliation will now take place in a manner that promotes the cause of peace and will continue to follow developments closely.”