UNITED NATIONS (AP) — President Donald Trump waded into thorny Middle East politics while at the United Nations on Wednesday, endorsing the two-state solution to bring an end the decades-long conflict between Israel and the Palestinians while poised to denounce the dangers posed by Iran.

Trump, a day after being greeted with laughter by world leaders still uncertain how to manage his “America First” ideology, explicitly backed Israel, leaned in on the importance of moving the U.S. Embassy to Jerusalem and suggested that he saw progress on the horizon for long-delayed hopes for Middle East peace.

“I like two-state solution,” Trump said in his most clear endorsement of the plan. “That’s what I think works best.”

Meeting with Israel Prime Minister Benjamin Netanyahu, Trump indicated that moving the embassy was “a big chip” the U.S. delivered to the Israelis.

“I took probably the biggest chip off the table. And so obviously they have to start you know we have to make a fair deal. We have to do something. Deals have to be good for both parties.”

Trump said he believed that the embassy “was always the primary ingredient as to why deals couldn’t get done.”

“Now that’s off the table,” Trump said. “Now that will also mean that Israel will have to do something that is good for the other side.”

The two-state “solution” is mostly aspirational. Ongoing conflict between Israel and Palestinians over the division of territory, borders and governance has spawned violence going back years and long stymied Mideast peace efforts.

Moving the embassy from Tel Aviv triggered considerable protest from the Palestinians and expressions of condemnation from many American allies who worried about further violence that could destabilize the fragile region. Trump said that his administration’s peace plan, in part helmed by his son-in-law senior adviser Jared Kushner, would be released in the coming months.

Trump’s meeting with Netanyahu came, symbolically, just ahead of his chairing a meeting of the U.N. Security Council about nuclear proliferation. The president had suggested, in a recent tweet, that Iran could be his focus, and he unloaded harsh rhetoric the day before on the nuclear-aspirant nation as a persistent malign influence across the Middle East.

“We ask all nations to isolate Iran’s regime as long as its aggression continues,” said Trump on Tuesday. The president has removed the U.S. from the 2015 nuclear accord with Iran, citing the country’s destabilizing actions throughout the region and support for terrorist groups like Hezbollah, and he accused its leaders on Tuesday of sowing “chaos, death and destruction.”

His national security adviser, John Bolton, went even further in a speech Tuesday, issuing a dire warning to Iran: “If you cross us, our allies or our partners; if you harm our citizens; if you continue to lie, cheat and deceive, yes, there will indeed be hell to pay,” Bolton said.

But despite his tough talk, Trump said he could envision relations with Iran moving along a similar “trajectory” as ones with North Korea. A year ago from the U.N., Trump belittled its leader Kim Jong Un as “Rocket Man” and threatened to annihilate the country but on Wednesday he touted the “the wonderful relationship” with Kim and teased that details of a second summit between the two men could be released soon.

The high-profile Security Council meeting came a day after Trump poured scorn on the “ideology of globalism” and heaped praise on his own administration’s achievements in a speech to the U.N. General Assembly that drew head shakes and even mocking laughter from his audience of fellow world leaders.

“The U.S. will not tell you how to live and work or worship,” Trump said as he unapologetically promoted his “America First” agenda. “We only ask that you honor our sovereignty in return.”

Speaking in triumphal terms, Trump approached his address to the world body as something of an annual report to the world on his country’s progress since his inauguration. He showcased strong economic numbers, declared that the U.S. military is “more powerful than it has ever been before” and crowed that in “less than two years, my administration has accomplished more than almost any administration in the history of our country.”

Just sentences into the president’s remarks, the audience began to chuckle and some leaders broke into outright laughter, suggesting the one-time reality television star’s puffery is as familiar abroad as it is at home. Trump appeared briefly flustered, then smiled and said it was not the reaction he expected “but that’s all right.”

Later he brushed off the episode, telling reporters, “Oh it was great. Well, that was meant to get some laughter so it was great.”

The leaders’ spontaneous response to Trump’s address only reinforced the American president’s isolation among allies and foes alike, as his nationalistic policies have created rifts with erstwhile partners and cast doubt in some circles about the reliability of American commitments around the world.

The laughter evoked a campaign line Trump frequently deployed against his predecessor Barack Obama — who embraced international engagement — suggesting that due to weak American leadership, “the world is laughing at us.”

In 2014, Trump tweeted, “We need a President who isn’t a laughingstock to the entire World. We need a truly great leader, a genius at strategy and winning. Respect!”

The General Assembly is four days of choreographed foreign affairs were designed to stand in contrast to a presidency sometimes defined by disorder, but they were quickly overshadowed by domestic political crises.

The fate of his second Supreme Court nominee, Brett Kavanaugh, was in fresh doubt after a second allegation of sexual misconduct, which Kavanaugh denies. Kavanaugh and his first accuser testify to Congress on Thursday.

Drama also swirls around the job security of Trump’s deputy attorney general. Rod Rosenstein was reported last week to have floated the idea of secretly recording the president last year and to have raised the idea of using the 25th Amendment to remove him from office. He will meet with Trump at the White House, also on Thursday.