In Brooklyn, a State Assembly race has attracted the involvement of marquee figures like Hakeem Jeffries, the House Democratic leader, and Letitia James, the New York State attorney general.

In East Harlem, race and ethnicity have cast shadows over another contest, with the question of whether the neighborhood should be represented by a Latino. And in Westchester County, a Democratic primary fight has included ugly accusations of lies, betrayal and purloined emails.

If there was any illusion that Democrats in New York would play nice until November’s all-important general election, these contests for the Assembly in Tuesday’s primaries suggest otherwise.

At the heart of many of these contests lies a long-simmering tension between institutional and progressive Democrats that has come to dominate many debates inside the State Legislature, including those involving housing and criminal justice.

“Democratic primaries are still a competition for the soul of the party. It’s not a formality,” said Trip Yang, a Democratic consultant and strategist. “There are public policy differences and differences in approach.”

Progressives argue that their mainstream Democratic colleagues have not done enough to improve the lives of working-class voters of color, leaving them frustrated and open to switching parties, as evidenced by the increasing numbers of Black and Latino men who have become Republicans. To stanch the bleeding, progressives argue, Democrats must reignite their base by addressing society’s inequalities with housing and health policies that shift power from the corporate class to working people.