The House on Tuesday adopted a resolution denouncing “socialism in all its forms,” boosting a Republican messaging push just two months before the midterm elections.

It also calls for passage of a GOP-backed voter ID bill — language that further diminished Democratic support for the measure, even among lawmakers who otherwise agreed with its underlying premise.

The final tally was 220-192, with eight Democrats voting in favor. Among them were Rep. Marie Gluesenkamp Perez, D-Wash., and others facing tough bids for reelection.

Sponsored by Republican Rep. Jeff Crank, who is himself in a competitive reelection race in Colorado, the resolution is a largely symbolic gesture that would make no changes in law. It warns against “implementation of socialist policies in the United States,” noting the win by New York Mayor Zohran Mamdani last fall and that other candidates associated with the Democratic Socialists of America are gaining ground across the country.

The vote was seen as an attempt to put moderate Democrats in purple districts on the record.