US President Donald Trump said on Monday he might travel to Israel for the opening of the US embassy in Jerusalem as he and Israeli Prime Minister Benjamin Netanyahu presented a united front against Iran in White House talks.

Trump’s decision for the United States to recognise Jerusalem as the capital of Israel and move the embassy there from Tel Aviv reversed decades of US policy, aggravated Arab allies and has complicated his administration’s attempt to revive long-stalled Middle East peace talks.

Trump, with Netanyahu at his side in the Oval Office, said he was considering making what would be his second visit to Jerusalem as president. The opening of the US embassy is planned for May.

“We’re looking at coming,” Trump said. “If I can, I will.”

Mired in corruption investigations threatening his political survival, Netanyahu – questioned at his home by police on Friday – stepped into a different spotlight during his five-day US visit.

Trump’s push to change or scrap Iran’s 2015 nuclear deal with world powers and concerns over Tehran’s foothold in Syria topped the agenda of his talks with Netanyahu, US and Israeli officials said.

Both leaders have long railed against the deal, citing its limited duration and the fact it does not cover Iran’s ballistic missile program or its support for anti-Israel militants in the region.

“If I had to say what is our greatest challenge in the Middle East to both our countries, to our Arab neighbours, it’s encapsulated in one word: Iran,” Netanyahu said. “Iran must be stopped. That is our common challenge.”

Trump has threatened to pull out of the agreement unless European allies help “fix” it with a follow-up accord. The White House said in a statement that Trump “underscored his goal of countering Iran’s malign influence.”

Netanyahu told Israeli reporters that Iran had been a big focus of talks, which he said ran an hour longer than scheduled.

Israel has accused Tehran of seeking a permanent military presence in Syria, where Iranian-backed forces support Syrian President Bashar al-Assad in a civil war.

Netanyahu, whose relationship with Trump has been among the closest of any world leader, has also cautioned that Israel could act against Iran itself after an Iranian drone flew into Israel last month and an Israeli warplane was shot down while bombing air defences in Syria. He has accused Iran of planning to build precision-guided missile factories in Lebanon, amid tensions along that border.

The talks also touched on Syria, Iraq, Lebanon and the Palestinians, Netanyahu said, while the White House said Trump had “emphasized his commitment to achieving a lasting peace deal between Israelis and Palestinians.”

Palestinian President Mahmoud Abbas, angered by Trump’s Jerusalem move, has refused to engage with the United States on Middle East peace, prompting Trump to delay the rollout of peace proposals.

Participating in the talks was Trump’s senior adviser and son-in-law, Jared Kushner, who has been on the defensive amid investigations into alleged meddling by Russia in the 2016 presidential campaign.

Some analysts believe Kushner’s ability to run the Middle East initiative has been handicapped by his loss of access to certain valued US intelligence because of a White House clampdown on access to such secrets for those without full security clearance.

The White House said the downgrade of Kushner’s security clearance did not affect the role he played in the meeting.

A US official speaking ahead of Netanyahu’s second visit to the Trump White House characterized it as a “routine check-in.” For Netanyahu, however, the Oval Office meeting offered a respite from his legal troubles.

Netanyahu, who will speak to the pro-Israel lobby group AIPAC on Tuesday, awaits a decision by Israel’s attorney general on whether to indict him, as police have recommended in two bribery cases. Netanyahu denies any wrongdoing.