BERLIN — German Chancellor Angela Merkel is stressing the need to work for a two-state solution to the Israeli-Palestinian conflict after US President Donald Trump signaled that he could accept a different outcome.

Merkel’s comments in her weekly video message Saturday came ahead of a March 2 visit to regional power Egypt, where she said she will discuss the matter with President Abdel-Fattah el-Sissi.

Trump said earlier this month he could accept a two-state solution or a single-state arrangement if it is agreed upon by all sides. His UN ambassador then insisted the US absolutely supports a two-state solution.

Merkel said: “I think we must continue on the way to a two-state solution. I see no other possibility becoming reality to achieve a peace process.”

Trump on Thursday expressed a preference for the two-state solution, but again said he would be happy with any framework acceptable to the two sides.

“No, I like the two-state solution,” Trump told Reuters in an interview, in response to a question on whether he had backed away from that framework, which for decades has been the internationally backed formula for resolving the conflict. “But I ultimately like what the both parties like,” Trump added.

“People have been talking about it for so many years now,” the president went on, and noted: “It so far hasn’t worked.” He then repeated: “I like this two-state solution, but I am satisfied with whatever both parties agree with.”

During his White House press conference with Netanyahu last Wednesday, Trump broke with longstanding US policy by saying two states were not necessarily the only acceptable solution to the conflict. “I’m looking at two-state and one-state, and I like the one that both parties like,” he said.