NEW YORK — Where Zohran Mamdani stands on sex work has become an enduring feature of the New York City mayoral race: The frontrunner has pushed back on accusations he wants prostitution legalized, but has declined to provide a clear accounting of his position.

The issue has become a chief line of attack for both Andrew Cuomo and incumbent Mayor Eric Adams. And Mamdani’s muddled response marks another example of his democratic socialist past colliding with a general election campaign intent on winning support from a broad swath of voters come November.

The latest chapter in the sex-work saga unfolded Monday, when Mamdani was asked to respond to Cuomo, his chief rival who bet a mosque-goer $10 over the weekend that Mamdani supported legalizing prostitution.

“I have never supported the legalization of prostitution, and I find it quite ironic to see Andrew Cuomo speak about betting in a mosque,” Mamdani said at an unrelated press briefing.

The attack line seized upon by Cuomo and Adams is one of several that also include Mamdani’s rhetoric around Israel, his past calls to defund the police and his socialist perspective on a variety of issues — all leveled in an attempt to paint him as too extreme for New York City.