It’s been open season on AIPAC since the moment when it became clear that opponents of the Iran nuclear deal wouldn’t be able to stop it in Congress. Today’s vote in the Senate, in which 42 Democrats filibustered a motion of disapproval, marks the formal end to the struggle, but for weeks critics of the umbrella pro-Israel group have been taking pot shots at it over the result. They say AIPAC made a big mistake by following the lead of the Israeli government in going all out to oppose the deal. They also accuse it of damaging the bipartisan pro-Israel coalition in Congress and being out of step with a lot of American Jews. One of the most prominent of such critics is Tom Dine, who served as AIPAC’s executive director. Dine writes in Foreign Affairs that the Iran deal is “AIPAC’s Waterloo” and compares it unfavorably to the group’s only other significant defeat — the 1981 battle over the sale of AWACS planes to Saudi Arabia — that he presided over. But the problem with Dine’s analysis is not limited to that misleading comparison. Dine is dead wrong not only about which side injected partisanship into the debate. He also fails to explain the difference between past battles with other administration and the current dustup with Obama. When faced with a choice between opposing a Democratic president and standing with Israel, this time liberal Jews chose the former.

As the former leader of the group, Dine has some standing to comment on it, but his opinion must be placed in context. He was forced out of his position at AIPAC after he was quoted making disparaging remarks about Orthodox Jews and is still bitter about what happened. Moreover, while AIPAC is a bipartisan organization with strong support from both Democrats and Republicans, since he left AIPAC, Dine has been openly identified with the political left. Today he works for the Israel Policy Forum, a group that is critical of the current Israeli government. Not surprisingly, Dine is a supporter of the Iran deal, and everything he says about the Israelis and AIPAC must be seen in that light.

That said, there is no denying that, on Iran, Obama won and his critics lost. But those seeking to exploit this result to denigrate AIPAC need to put this in perspective. It should be remembered that, far from illustrating AIPAC’s declining influence, the majority of both Houses of Congress actually agree with AIPAC on the issue. Moreover, polls consistently show that large majorities of Americans also oppose the deal. The only reason why the deal is surviving is due to a reverse ratification process that sidestepped the constitutional provision requiring two-thirds of the Senate to vote in favor of the pact. Instead, by brazenly claiming it required no Congressional approval at all and then agreeing to the Corker-Cardin compromise that let the president prevail with only the one-third plus one votes, needed to sustain a veto. Anyone who thinks this shows that Obama’s left-wing cheerleaders at J Street have more influence on Capitol Hill than AIPAC needs math lessons.

As for the analogy to the AWACS controversy, there are some similarities. Both of these disputes involved Israeli governments and their American supporters taking on an American president who seemed to be prioritizing a relationship with a Muslim nation over friendship with Israel. The radar planes were thought to be game-changing military assets, and less than eight years after the Yom Kippur War — which turned out to be the last time Arab nations would take on Israel in a conventional war — this was seen as potentially tipping the balance of power.

As it turned out, the Saudis, though relentlessly hostile to Israel, had no interest in fighting it. Instead, they were, with good reason worried more about Iran and Iraq. More to the point, they still are since the Saudis are, at least privately, as upset about Obama’s appeasement of Iran as the Israelis.

The AWACS defeat was a seminal moment for AIPAC because it was after that the lobby realized it had to prioritize building support for Israel in Congress on both sides of the aisle. Since then, its influence has grown to the point where it is demonized as an all-powerful tale wagging the dog of the American government even though its resources still pale before those of many commercial special interests.

It is true that party lines played a big role in the outcome of the debate on Iran, but the charge repeated by Dine that AIPAC and the Netanyahu government injected partisanship into the issue is dead wrong. Up until this year, there was a strong bipartisan consensus in Congress on Iran that backed even tougher sanctions than the ones Obama is dismantling. It was not broken up by Israel or AIPAC but by the president. The only lever he had to rally Democrats to support him on the issue was party loyalty, and it was highly effective. Against a sitting president who remains very popular among his party’s left-wing base, AIPAC never had a chance. If anything they deserve credit for ensuring that there were no Republican defections and that a number of prominent Democrats defied the president.

But Dine is right about one thing. Obama was successful in rallying a critical mass of American Jews to his side despite the pleas of Israel’s government and AIPAC. How did that happen? It’s true that the Netanyahu government is not that popular among liberal Jews. But Dine should remember that the government of Menachem Begin had just as much trouble getting liberal Jewish groups that viewed him with distaste to back its policies.

The crucial difference here is that Begin’s opponent in the White House was a Republican while Netanyahu’s was a Democrat. The same measure applies to the other significant conflict in Congress between AIPAC and an American president. In 1991, an Israeli government, led by Yitzhak Shamir, that was just as unpopular as that of Netanyahu challenged President George H.W. Bush when he sought to deny loan guarantees to the Jewish state needed for immigrant absorption after the collapse of the Soviet Union. Bush smeared AIPAC in terms that bore a resemblance to anti-Semitic tropes about Jewish power and money and a united American Jewish community condemned him. But when Obama used similar language to that of the elder Bush, liberal Jews defended him rather than joining with the president’s critics. Partisan loyalty among a demographic group that is second only to African-Americans as the most loyal to the Democrats was the decisive factor.

Over the last 35 years, the two parties largely switched positions on Israel. Whereas in 1981, Democrats could be counted on as fervent supporters of the Jewish state, now their base is largely hostile to it even though most members of the House and Senate still term themselves friends of Israel. Many Republicans were still hostile to the Jewish state at the time of the AWACS fight. Now support for Israel in the party is nearly universal. Yet rather than lamenting the willingness of so many Democrats to put party over principle when they backed Obama, they now criticize the GOP for being loyal to it.

Had a Republican president struck an Iran deal as bad as that agreed to by Obama, there’s little doubt that the same liberal Democrats that are voting today with their party’s leader would be calling the deal a betrayal and vowing to fight it to the end. AIPAC can always count on a united Jewish community being willing to fight a Republican, but it can never hope to beat a Democrat who challenges Israel.

Rather than bash AIPAC for not being able to persuade more Democrats to oppose Obama, friends of Israel need to realize the real problem. Though many Democrats are ardent supporters of the Jewish state, many in the party’s left-wing rank and file are not. The task of rebuilding the U.S.-Israel alliance that Obama has done so much to damage must start with recognizing that liberal Democrats are the ones who have lost their way, not the pro-Israel community.