For Prime Minister Benjamin Netanyahu of Israel, a meeting with President Trump is always an opportunity to showcase their close relationship even if they, at times, disagree.

This time, the stakes are especially high.

Both leaders are facing electoral challenges in the months ahead and are expected to meet at the White House on Tuesday as their interests appear to be diverging sharply on the war with Iran.

Before departing for Washington on Monday, Mr. Netanyahu said in a statement that this would be his eighth meeting with Mr. Trump since the president was elected for his second term, and that Iran would be “first and foremost” on the agenda.

“I am embarking on this mission with one clear goal — to ensure the security, strength, and future of our dear state of Israel,” he added.

Mr. Netanyahu, who is trailing in the opinion polls at home before Israel’s fall vote, is under pressure to show his domestic audience that he still has a close working relationship with Mr. Trump, analysts say, despite their differences. Mr. Trump is heading into U.S. midterm elections in November after an unpopular war that many believe he was dragged into by Israel and that has caused tensions between Israel and Washington.

Both leaders failed to deliver on their war goals of ending Iran’s nuclear program and overthrowing the country’s authoritarian clerical rulers in their joint war against Iran, which began in late February.