The Israeli government and the American Israel Public Affairs Committee (AIPAC) have failed to marshal Congressional opposition to President Barack Obama’s nuclear deal with Iran.

But that failure has prompted widespread chatter about the irreparable damage done to US-Israel ties and the demise of AIPAC as a virtually omnipotent lobby.

Despite pouring millions of dollars into its campaign, inundating the airwaves and clogging social media feeds, AIPAC’s efforts to sway members of Congress paid only minimal dividends.

But does this mean that AIPAC has lost its mojo and Israeli Prime Minister Benjamin Netanyahu can now be safely ignored by the Obama administration as a blowhard? Hardly.

This fiasco for Israel and its lobby was entirely predictable and even foreordained after Netanyahu opted to conspire with John Boehner, the House speaker, to deliver his controversial speech to Congress in March opposing talks with Iran.

Netanyahu’s disrespect in circumventing the president prompted around 60 Democratic members of Congress — one-quarter of the party’s caucus — to publicly boycott the address, opening up an unprecedented partisan breach.

After Netanyahu’s stunt in Congress, it was self-evident that no Democratic members of Congress, except for the party’s most hardcore Zionists such as senators Charles Schumer of New York and Ben Cardin of Maryland, would vote to kill what is arguably the signature foreign policy achievement of the Obama administration.

AIPAC could have pumped hundreds of millions of dollars into its campaign and probably wouldn’t have changed a single vote.

Netanyahu is no fool and neither is AIPAC. So then why did they expend so much political capital and money on a lost cause?

Simple: the louder Israel and its lobby bellowed that the nuclear deal with Iran endangered Israel’s security and presented it with an existential threat, the larger the payout from the United States to back its demands for military aid.

Israel is likely to get recompensed for the Iran nuclear deal in two ways.

The first is through Congressional authorization of the transfer to Israel of advanced weaponry such as bunker-buster bombs. For example, Cory Booker, the Democratic senator from New Jersey who broke with his former mentor Rabbi Shmuley Boteach by supporting the deal, stated that the “US should provide Israel with access to the Massive Ordnance Penetrator (MOP) to help deter Iranian cheating.”

And Obama appears amenable to upping the quality of weapons the US provides Israel. In a letter to Jerrold Nadler, a Democratic representative for New York, Obama pledged that “Our support for Israel is also an important element in deterring Iran from ever seeking a nuclear weapon.”

Thus Israel is likely to receive from the US the weapons it would need to threaten or actually carry out the attack on Iran the US just potentially avoided with the nuclear deal.

Second, Israel will likely reap an enormous windfall from the United States by negotiating a new 10-year deal for additional military aid. During the George W. Bush administration, the US signed an agreement to provide Israel with $30 billion in military aid from 2009 to 2018.

Ever since he visited Jerusalem in March 2013, Obama has repeatedly made clear that he wants to extend — and even increase — military aid to Israel.

Although the timing of the Iran nuclear deal and the impending expiration of the agreement with Israel is coincidental, Netanyahu is shrewdly choreographing his steps to maximize his leverage with the US and wring out the most concessions possible.

According to the Israeli daily Haaretz, twice since April, Obama personally contacted Netanyahu, practically pleading with him to start talks on how the US may bolster the Israeli military’s arsenal. But the Israeli prime minister steadfastly refused.

Now with Iran a done deal, these discussions are getting underway in earnest — and media reports suggest that Israel will try to get as much as $45 billion in military aid from the US through 2028. In other words, Obama may now wind up signing a deal to increase the Bush administration’s commitment to Israel by 50 percent.

While it is doubtful that Israel would use these weapons to unilaterally attack Iran, they unquestionably will be used to entrench and solidify Israel’s military occupation and colonization of Palestinian land, making the US even further complicit in Israel’s accompanying atrocities.

This new military aid deal, sadly, will be Obama’s enduring legacy on the Israeli-Palestinian issue as his presidency draws to a close.

The debacle for Netanyahu and AIPAC on Iran demonstrably shows that Israel and its allies do not dictate the terms and contours of broader US foreign policy goals. However, their power to preserve the status quo on US policy toward Israel and the Palestinians has emerged largely unscathed from this battle.

Netanyahu is coming to Washington to kiss and make up with Obama over Iran in November — and to collect his check. Without a massive uproar from civil society before then, US taxpayers will be on the hook for another decade of underwriting Israel’s oppression of Palestinians.

Vice President Joe Biden recently acknowledged that US taxpayers already fund 20 percent of Israel’s entire military budget.

Enough is enough. Fortunately growing numbers of Americans agree.

To make this message clear, tens of thousands have already endorsed the campaign calling on Obama not to give any more weapons to Israel.

(ELECTRONIC INTIFADA)