It is hard to know who was stupider in this case: AIPAC or New York City Mayor Bill de Blasio.

Working together, they managed to take a routine political event intended to promote support for Israel and turn it into a mini-crisis and a major embarrassment for all concerned.

This is what happened: On Thursday, January 24, the mayor appeared at an AIPAC event at the Hilton Hotel in midtown Manhattan. The event was closed to the press and did not appear on the mayor’s public schedule; furthermore, a reporter who had managed to elude security and get inside was discovered and escorted out during the mayor’s talk.

One might think that there were some highly sensitive goings-on that justified all this secrecy. But there weren’t. The mayor is an enthusiastic supporter and friend of Israel. His remarks, taped by the reporter before he was ejected, included such comments as, “It is our obligation to defend Israel, but it also something that is elemental to being an American because there is no greater ally on earth.”

Mayors of New York City, of course, are expected to be outspoken allies of Israel; after all, more than a million Jews live in the City and 15% of the registered voters are Jewish. Indeed, there is no serious candidate for mayor in recent memory that did not have a clear pro-Israel record. At the same time, there is absolutely nothing to indicate de Blasio’s views are a matter of convenience. He has been expressing his strong pro-Israel sentiments for years, and there is every reason to believe that they are sincerely held and deeply felt.

So, since everything that was said has long been part of the public record, why the need for secrecy? According to de Blasio, he was simply accommodating the wishes of the AIPAC leadership, which had set the ground rules for the event. But assuming the mayor’s claim is accurate, AIPAC was wrong to make the request and de Blasio was wrong to agree.

From AIPAC’s perspective, the “off-the-record” policy is silly from every perspective imaginable. Most troubling, it gives the event a conspiratorial air—which is both unnecessary and self-defeating. The whole purpose of pro-Israel advocacy is to generate public support for Israel’s cause, which already enjoys significant backing from the American people. Anything that seems to rely on behind-closed-doors confidences can only be harmful to Israel’s image and interests. With very rare exceptions, work on Israel’s behalf should be done right up front, in the light of day. In addition, it is astoundingly naïve to think that the mayor of New York can deliver a speech to a large gathering in midtown without it becoming a press issue.

Of course, the explanation for what happened is undoubtedly prosaic rather than malevolent. Some are suggesting that the “off-the-record” approach was simply intended to make AIPAC’s donors feel good; or that it was a PR ploy to generate attention. If this is true, it is still shamelessly manipulative, and it doesn’t make me feel better. In my experience, AIPAC – thankfully – is generally far more sophisticated than that.

From Mayor de Blasio’s perspective, his bumbling could turn out to be very serious by conveying the impression that an emphatically pro-Israel mayor is perhaps not so pro-Israel after all. By attempting to dodge the press, the mayor provided an opening for critics to claim that he did not want his pro-Israel views to be widely disseminated because they might offend liberal supporters who are less supportive of Israel than he is. This is hogwash, but even the New York Times, which should know better, included the charge in its story.

It is hard to know if these charges will have legs, but they might; and if so, the mayor will have a tougher time steering a sensible, pro-Israel course in the future. For example, every now and again the mayor of New York has to be more than a cheerleader and take a position on a substantive issue relating to Israel. A good example is the appearance of BDS speakers at Brooklyn College in February of last year. When efforts were made by city politicians to cancel the event and cut funding to Brooklyn College, Mayor Bloomberg, while expressing his intense opposition to BDS, made clear his support for the College’s right to host the event and opposed any funding cuts.

In a communication to the College’s President, de Blasio, then Public Advocate, joined other public figures in supporting the mayor’s position. This was the right thing to do then, and it would be the right thing for him to do as mayor. But given the contretemps of this past week, with his Israel bona fides suddenly being questioned, it would be a little harder to do right now.

The lesson for the mayor and for AIPAC: Forget the hush-hush, “only for your ears” stuff. Invite in the press and everyone else. The only way to keep up the good fight for Israel is to fight the fight in public, for all to hear.

This piece first appeared on Haaretz.

Rabbi Eric H. Yoffie served as president of the Union for Reform Judaism from 1996 to 2012.