A general view picture shows the Israeli barrier running along the East Jerusalem refugee camp of Shuafat, in an area Israel annexed to Jerusalem after capturing it in the 1967 Middle East war February 15, 2017. REUTERS/Ronen Zvulun

CAIRO (Reuters) - The Palestinian-Israeli conflict requires a two-state solution, the Arab League and Egypt reaffirmed on Thursday, distancing themselves from a move away from that commitment by U.S. President Donald Trump.

The idea of a Palestinian state living side-by-side with Israel has underpinned Middle East peace efforts for decades.

But the Republican president said on Wednesday after meeting Israeli Prime Minister Benjamin Netanyahu that he would accept whatever peace the two sides chose, whether it entailed two states or one.

Egypt was committed to a two-state solution, a foreign ministry spokesman told state news agency MENA.

In comments also reported by MENA, Arab League Secretary-General Ahmed Aboul Gheit agreed, adding that moving the U.S. embassy to Jerusalem would make the Middle East more volatile.

“It requires a comprehensive and just settlement based on a two-state solution and the establishment of an independent Palestinian state on ... 1967 borders with its capital in Jerusalem,” it quoted Aboul Gheit as saying after meeting the U.N secretary general chief Antonio Guterres in Cairo.

Guterres told a news conference on Wednesday there was “no alternative” to the two-state solution.

In Israel, Netanyahu’s far-right political allies hailed the U.S. shift in support for a Palestinian state and shrugged off a call by Trump to curb Israeli settlements on occupied land.