US President says one-state or two-state solution possible as long as sides agree, after meeting Israeli PM Netanyahu.

President Donald Trump has dropped Washington's commitment to a two-state solution to the Israeli-Palestinian conflict, backing away from a long-held position of the US and the international community in the Middle East.

In a joint press conference on Wednesday with Israeli Prime Minister Benjamin Netanyahu, Trump said he would back a single-state solution if the two sides agreed to it.

"Looking at two-state or one-state, I like the one that both parties like. I'm very happy with the one both parties like. I can live with either one," Trump told reporters after meeting Netanyahu in Washington.

"The United States will encourage a peace and really a great peace deal ... We will be working on it very, very diligently. But it is the parties themselves who must directly negotiate such an agreement," Trump said.

A two-state solution - the idea of Israel and Palestine living side-by-side and at peace - has been the bedrock of US and international diplomacy for the past two decades.

Netanyahu said that he wanted to focus on "substance" and not "labels," when asked about his support for a two-state solution.

"There are two prerequisites for peace. First, the Palestinians must recognise the Jewish state ... Second, in any peace agreement, Israel must retain the overriding security control over the entire area west of the Jordan River," he said.

Trump also said that Washington was working to move the US embassy in Israel from Tel Aviv to Jerusalem.

"I would like to see that happen. We are looking at it very very strongly. We are looking at it with great care. Let's see what happens."

"I'd like to see you pull back on settlements for a little bit," Trump told Netanyahu on the illegal Israeli settlements in Palestinian territories.

Earlier on Wednesday, UN Secretary-General Antonio Guterres had warned that there was "no alternative" to a two-state solution to the conflict, after a White House official said peace did not necessarily have to entail Palestinian statehood a day before.

"There is no alternative solution for the situation between the Palestinians and Israelis, other than the solution of establishing two states and we should do all that can be done to maintain this," Guterres said during a visit to Cairo on Wednesday.

Palestinian officials also issued their warnings to the US against abandoning a two-state solution.

"If the Trump administration rejects this policy it would be destroying the chances for peace and undermining American interests, standing and credibility abroad," Hanan Ashrawi, a senior member of the Palestine Liberation Organisation (PLO), said in response to the US official's remarks.

"Accommodating the most extreme and irresponsible elements in Israel and in the White House is no way to make responsible foreign policy," she said in a statement.

The Palestinians want an independent state in the West Bank and Gaza, with the capital in East Jerusalem, which Israel seized in the 1967 Middle East war.

Netanyahu committed, with conditions, to the two-state goal in a speech in 2009 and has broadly reiterated the aim since. But he has also spoken of a "state minus" option, suggesting he could offer the Palestinians deep-seated autonomy and the trappings of statehood without full sovereignty.