NEW YORK -- In what was likely the last meeting he will have with Israeli Prime Minister Benjamin Netanyahu before leaving office, President Obama touted a $38 billion military assistance package for Israel that would ensure the Israel has the full military capabilities it needs.

“It allows the Iraelis to have some kind of certainty in a moment when there’s enormous uncertainty in the region,” the president said. “It’s a very difficult and dangerous time in the Middle East.”

Mr. Obama stated that “the bond between the United States and Israel is unbreakable,” and that it it important to American national security “to make sure we have a safe and secure Israel.” The memo of understanding, he said, is indicative of that. The memo, signed a week ago, provides Israel with the largest single pledge of military assistance in U.S. history -- $3.8 billion per year over a decade.

Get Breaking News Delivered to Your Inbox

Netanyahu concurred with the president on the relationship between the two countries, saying that “Israel has no bigger friend than America, and America has no bigger friend than Israel.” He told Mr. Obama his “influential voice will be heard for many decades,” and he welcomed him to try out the “terrific golf course” near his home -- though he also mentioned that he does not golf.

In the past, the relationship between Netanyahu and the president has been rocky, reaching a low point during the negotiations over the Iran nuclear deal. Ties between the two leaders never fully recovered after Netanyahu showed up on Capitol Hill to lobby Congress against Mr. Obama’s nuclear deal with Iran. The Obama administration, meanwhile, has been dismayed by periodic comments by the Israeli leader suggesting he’s less-than-serious about the two-state solution that has been the basis of all serious peace efforts for decades.

“Surely, Israelis and Palestinians will be better off if Palestinians reject incitement and recognize the legitimacy of Israel, but Israel recognizes that it cannot permanently occupy and settle Palestinian land,” Obama said a day before the meeting in his final U.N. address.

The White House is hoping the unprecedented aid will curb the perception among Israel’s supporters that Obama has been insufficiently supportive of Israel’s security. Yet Iran’s chief of staff of the armed forces said Wednesday the U.S.-Israeli aid deal only makes Iran more determined to strengthen its military. Israel considers a nuclear-armed Iran to be an existential threat.

The military aid agreement, reached after arduous negotiations, only partially masks the underlying tensions between the two governments — most notably over Israel’s posture toward the Palestinians and continued expansion of settlements in occupied territories.

Despite Mr. Obama’s protestations, since he took office Israel has pushed a wave of construction that matched or even exceeded the pace of building when George W. Bush was president, according to Israeli government data obtained by The Associated Press.

“We’ve been concerned about continued settlement activity, the potential viability of a Palestinian state in the face of that settlement activity. We’ve raised those directly with the Israeli government,” Ben Rhodes, the president’s deputy national security adviser, said Tuesday. “I’m sure President Obama will do so tomorrow as well.”

Previous efforts to broker Israeli-Palestinian peace have left a bad taste for the Obama administration, most notably a frenetic attempt by Secretary of State John Kerry that collapsed in 2014. Reluctant to invest more diplomatic resources at a time when he says both sides lack the needed political will, Mr. Obama has long since conceded that his administration won’t be the one to forge a resolution to the Mideast conflict.

Yet that has not stopped the president from publicly flirting with the possibility that, in his final months in office, he’ll seek to influence the future debate by laying out what he sees as the contours of any viable deal. That could come in the form of a major speech or a U.S.-backed U.N. Security Council resolution — both moves that would increase pressure on Israel and that Netanyahu would be expected to oppose.

“I wouldn’t rule out the president taking any particular step,” Rhodes said.

Netanyahu was in New York at a time of renewed violence, including a series of stabbings by Palestinian assailants in Israel and other incidents that have raised concerns about a return to more frequent bloodshed. Hours before his meeting with President Obama, Turkish officials shot and slightly wounded an attacker armed with a knife who tried to enter the Israeli Embassy in Turkey, Turkish officials said.