UNITED NATIONS — UN Secretary General Ban Ki-moon believes that Israel and the Palestinians can still reach an agreement for peace if both sides are willing to make sacrifices, the UN’s top Middle East envoy said Tuesday.

Briefing the security council as nine months of peace talks expired amid mutual recriminations, Robert Serry also said the UN backed Palestinian reconciliation efforts so long as Hamas took steps to moderate its views.

“The secretary general firmly believes there is still a window for us –the international community and parties—to act, if we wish to realize the vision of two states for two peoples, Israel and Palestine, living side by side in peace, security and mutual recognition of each other’s legitimate rights and those of their respective citizens, including self-determination,” Serry told the Security Council Tuesday.

He called for both sides to reflect on their actions as an avenue for restarting talks.

“Both sides have to convince each other anew they are partners for peace,” he said. “If Israel is serious about the two-state solution, it must recognize the negative impact of continued illegal settlement activity. Palestinians in turn should be reflective of their actions in international fora.”

US Secretary of State John Kerry had envisioned brokering a final peace agreement when he brought the sides together last July, but negotiations stalled numerous times throughout the process before finally falling apart following a series of steps by both sides. The nine months set ahead of time for talks expired on Tuesday.

In outlining the “political stalemate” and breakdown of the talks, Serry blamed Israel’s postponement of a scheduled prisoner release as the starting point from which things snowballed.

Following the delay, Israel announced that it would be reissuing new tenders for construction in the West Bank, and the Palestinians applied for membership in 15 international organizations, a unilateral action they had pledged not to take during negotiations.

Despite international efforts to hammer out a deal to extend negotiations, the two sides failed to come to an agreement, and last week the Palestinian Authority announced that it had reached a reconciliation deal with Hamas, the ruling entity in the Gaza Strip, which Israel and the US consider a terrorist group.

In response to the deal, Israel halted negotiations, US President Barack Obama acknowledged a need for a pause in the talks, and reports emerged indicating the US would back Israel’s refusal to negotiate with a government that included Hamas.

However, Serry said that the secretary general had received assurances from the Palestinians that Hamas would have to recognize Israel, renounce violence and pledge to honor previous agreements as part of the deal, and saw the deal as a positive step.

“On the basis of those commitments, the secretary general is of the view that this development can constitute an opening that offers, at long last, the prospect of reuniting the West Bank and Gaza under one legitimate Palestinian Authority, including by holding long-overdue elections,” Serry said.

“We will be following developments closely in the period ahead, and continue to believe that if unity is implemented on the terms described by President Abbas, it is not contradictory with continued peaceful negotiations, as the President himself has reiterated,” he added. “As such it should be viewed as an opportunity, not a threat.”

Following the unity deal, Hamas officials declared that it would never recognize Israel.

Serry also addressed numerous other issues that the secretary-general saw as matters of concern, including rising violence on the part of both sides in the West Bank, tensions in East Jerusalem, the humanitarian situation in Gaza and settlement activity.