Washington (CNN) President Donald Trump provided Benjamin Netanyahu both temporary refuge from ongoing scandal and a de facto campaign venue at the White House when he hosted the embattled Israeli prime minister for talks Monday.

Cementing the sense he was providing a gift to Netanyahu as his election nears, Trump signed a proclamation formally recognizing the contested Golan Heights -- considered Israeli-occupied territory by the international community -- as part of the state of Israel.

Trump had previewed that decision last week in a tweet, but Monday's move formalized the policy.

"Today I am taking historic action to promote Israel's ability to defend itself and really to have a very powerful, very strong national security, which they're entitled to have," Trump said before signing the measure.

He handed his pen to Netanyahu to deliver to the "people of Israel."

"This was a long time in the making," Trump said. "Should have taken place many decades ago."

The meeting reinforced the close bond between Trump and Netanyahu, who were dressed alike in red silk ties and referred to each other with endearment. Trump called Netanyahu a "special man" and referred to him by his "Bibi" nickname; Netanyahu termed Trump his "dear friend Donald."

The meeting, which was announced last week, came as Netanyahu faced new allegations of corruption, which are piled on top of accusations he used his position for personal gain.

Legal plights have been a shared burden for Trump and Netanyahu over the past several years. But Trump is entering the week with some of his troubles lifted: special counsel Robert Mueller has ended his investigation and found no evidence Trump or his associates colluded with Russia , according to the attorney general.

The investigation was less determinative on whether Trump obstructed justice. But nevertheless the President plans to use the conclusion to attack Democrats and his opponents for leading a fruitless probe.

In mounting his own self-defense, Netanyahu has employed some of the same tactics as Trump, decrying his accusers as politically motivated, lambasting "fake news" and even using the term "witch hunt" to describe the various corruption cases.

The claims of misconduct come as he's facing the toughest re-election bid of his political career. Trump discarded past US practice by agreeing to meet with Netanyahu within weeks of the election.

Initially scheduled over two days, including dinner with Trump on Tuesday evening, Netanyahu announced on Monday he was cutting his trip short to return home after a rocket fired from Gaza struck a house in central Israel.

Minutes before Netanyahu arrived to the White House, the Israeli military announced it was striking Hamas targets in Gaza.

Trump decried the attack in remarks on Monday.

"Our prayers are with our friends in Israel as they carry out an incredible way of life in the face of great terror," he said.

Even Netanyahu's truncated visit was meant to bolster his political standing in Israel, where Trump remains popular.

At the same time Netanyahu was meeting Trump at the White House, his main opponent in the April elections, retired Army chief of staff Benny Gantz, was addressing the yearly conference of the American Israel Public Affairs Committee, held at the Washington Convention Center across town.

Netanyahu was also scheduled to address the gathering on Tuesday but his announced return to Israel will preclude him making an appearance that has been a traditional centerpiece of the conference. US Democrats this year have been reckoning with whether to appear at AIPAC, which has come under criticism for advocating against the Iran nuclear deal.

In recent weeks, Trump has harshly criticized his political opponents as being anti-Israel, citing comments he claims are anti-Semitic. In addition to aiding Netanyahu in his election bid, the Golan Heights move also appeared designed to give Trump a boost among pro-Israel voters in the US.

"The Democrats have very much proven to be anti-Israel, and it's a disgrace," Trump claimed on Friday morning at the White House. "I don't know what has happened to them, but they are totally anti-Israel. Frankly, I think they are anti-Jewish."