JERUSALEM — Israel's Prime Minister Benjamin Netanyahu, under threat of indictment and fighting for re-election in just three weeks against a popular former Army chief, Benny Gantz, is getting a big boost from President Donald Trump and Secretary of State Mike Pompeo, clearly seeing foreign policy as a welcome distraction from his domestic troubles.

In Jerusalem Wednesday night, Netanyahu welcomed Pompeo enthusiastically, telling him, “I want to thank you and President Trump for everything that you’ve been doing to support this partnership which I think is exceptional.”

Pompeo replied that “the Israeli people can have confidence that President Trump will maintain this close bond. I know that you and the President have an outstanding working relationship.”

And the White House announced that Netanyahu would be visiting the president in Washington and having dinner at the White House next week, just before the April 9 election.

Secretary of State Mike Pompeo and Israeli Prime Minister Benjamin Netanyahu shake hands as they deliver joint statements during their meeting in Jerusalem on March 20, 2019. Jim Young / Pool via AP

In March of 2015, then-President Barack Obama refused to grant Netanyahu a pre-election visit, saying, “he needs to be far away enough from the election that it doesn’t look like in some ways we’re meddling or putting our thumbs on the scale.”

Trump has no such reluctance, having a vested interest in the re-election of one of his strongest allies. And, after a series of pro-Israel foreign policy decisions, Trump is popular in Israel, with a recent poll showing his popularity at 65 percent.

Facing one of his toughest election challenges in years, the embattled Israeli leader is playing the Trump card for all it’s worth: In recent months, he has been promoting their relationship on a billboard and airing a campaign ad showing Trump saying, “Today we officially opened the United States Embassy in Jerusalem. Congratulations!”

The embassy move alone was an enormous political coup for the Israeli Prime Minister. For decades, U.S. presidents of both parties have refused to recognize Jerusalem as Israel’s sole capital, to preserve Palestinian hopes for a share of the city they also claim for a future capital.

After President Trump reversed that policy in December of 2017, the Palestinians have refused to meet with any U.S. officials, and Trump's long-awaited Middle East peace plan is stuck on the drawing board. On Thursday morning, Pompeo will be the first Secretary of State to visit that relocated embassy, a ceremonial validation of Netanyahu’s extraordinary leverage with this White House.

Even more important to the prime minister was Trump’s withdrawal from the Iran nuclear deal, against the advice of his entire national security cabinet at the time, with the exception of then-CIA director Pompeo. Now, as America’s top diplomat, Pompeo is promising even harsher actions against Iran in close coordination with Netanyahu, to the distress of America’s closest European allies who are abiding by the agreement.

From left, Secretary of State Mike Pompeo, sits with Cypriot President Nicos Anastasiades, Israeli Prime Minister Benjamin Netanyahu and Greek Prime Minister Alexis Tsipras during their meeting in Jerusalem on March 20, 2019. Jim Young / Pool via Reuters

In a notable recent policy change, the State Department no longer refers to the West Bank and Golan Heights as “occupied” by Israel. The Israeli government is also pushing for the U.S. to recognize its annexation of the Golan Heights, seized by Israel at the end of the 1967 Six-Day War, which is of huge strategic importance to the Jewish state.

The two men are close, sharing strategy and political supporters, notably Las Vegas casino and Trump contributor Sheldon Adelson. There are also signs in this campaign that Netanyahu is modeling himself after Trump’s style — accusing the media of “fake news,” and aligning himself with ultra-nationalist anti-Arab factions to energize his base.

Whether becoming a “mini-Trump” will be enough to win him a fifth term is an open question.