[What you need to know to start the day: Get New York Today in your inbox.]

After a New York City councilman said that the Council was “controlled by the homosexual community,” his influential committee — created at his request — was dissolved.

Another council member was bounced from the immigration committee when he said on Twitter that “Palestine does not exist,” and referred to “so-called ‘Palestinians’” in another tweet.

The remarks, by Rubén Díaz Sr. of the Bronx and Kalman Yeger of Brooklyn, brought immediate condemnation from their colleagues and led to what the City Council speaker, Corey Johnson, said was a “loss of confidence” in both men.

As more and more public officials face scrutiny for expressing views that some perceive as racist, homophobic, sexist or hateful, the effort to deal with them in a way that satisfies the public’s desire for justice while upholding the free-speech rights of the offenders has become increasingly complex.