In the upscale gay resort town of Fire Island Pines, colorful flags honor L.G.B.T.Q. history makers like the actress Wanda Sykes and the drag queen RuPaul in a small park near the harbor. For a few hours this month, one flag also honored Representative Ritchie Torres, the first openly gay Afro-Latino member of Congress.

But Mr. Torres is also an outspoken supporter of Israel, and not long after his flag went up, it was torn down by the gay activist group ACT-UP, which was also honored at the park, and replaced with two flags, one of which honored queer Palestinians.

Within hours, the flag for queer Palestinians was also torn down by Michael Lucas, a pornographic performer and filmmaker with a history of anti-Muslim statements.

The dispute on Fire Island, just off Long Island, was just one expression of the tensions over the Gaza war that have wracked American public life. But within New York’s L.G.B.T.Q. community, whose members hail from every ethnic and social background and tend to be highly attuned to issues of social justice, the war has touched off some especially raw conflicts.

Those divisions have been on full display during Pride Month, a time typically focused on celebration and solidarity.

The fight over how the community should respond to the war in Gaza has played out in fiery online comments and false accusations of pro-Hamas activity. On Fire Island, the flag conflict has pitted Mr. Torres and local homeowners, including Mr. Lucas, against the very activists honored at the park. Elsewhere in New York, similar, if lower profile, disputes have shaken gay bars, L.G.B.T.Q. fund-raising dinners and Pride festivities.