US President Barack Obama acknowledged on Tuesday that Israeli-Palestinian peace talks were difficult, but insisted a two-state solution was “the best way, the only way” to ensure a better future for the two peoples.

“None of us are under any illusion that this would be easy,” Obama said at a press event shortly before the two leaders met on the sidelines of the UN General Assembly gathering underway in New York.

The talks have “already entailed significant political risk by President Abbas, as well as Prime Minister Netanyahu,” Obama said. “Sitting directly at the table, we’ve seen Palestinian and Israeli representatives discuss some of the most difficult issues that have been roadblocks to peace for too long.”

He added: “But I think the reason that they’ve been willing to take those risks is they realize this is the best way, the only way, for us to achieve what should be our goal: two states living side-by-side in peace and security. It’s right for Palestinian children. It’s right for Israeli children.”

Obama praised Abbas, saying, “President Abbas I think has consistently rejected violence, has recognized the need for peace, and I’m grateful to him for his efforts.”

The US president was also careful to emphasize American support for the fragile rule of the Palestinian Authority.

“The Palestinian Authority has been a critical mechanism to improve governance and increase transparency in the West Bank. Obviously, the Palestinian Authority operates under significant constraints, including resource constraints. But we think it’s very important that we continue to support efforts that have been made by the Authority, for example, to improve internal security and professionalize security forces inside the Authority. And that, I think, lays also an important foundation for the kind of economic development and governance that will be critical for an independent Palestinian state.”

Abbas thanked Obama for his support, and “all the support that the US is extending to the Palestinian people to build the institutions of the future Palestinian state, which hopefully will materialize very soon with your support and continued assistance.”

He called the talks a “historic opportunity” and insisted the Palestinian side was “fully committed to the peace process so that we can reach a final settlement that ultimately will lead to the creation of an independent Palestinian state that would live side-by-side in peace and security with Israel.”

Like Obama, he also said the Palestinians “have no illusions that peace will be easy or simple. And we have to overcome several difficulties, but we realize that peace in the Middle East is not just important for the Palestinians and Israelis, it’s important for the entire region and the world. We understand there will be difficulties, but we will do our utmost best to overcome them.”

American-led peace talks resumed in July after over three years of stalled negotiations.

Obama is slated to meet Prime Minister Benjamin Netanyahu in Washington next week.