What goes around comes around, and on Tuesday, karma came for President Trump and his Republican acolytes. From Washington to Maine, New Jersey to North Carolina, Trumpist ugliness was met and vanquished, sometimes by the very targets of right-wing scorn.

In January, a local New Jersey Republican politician, John Carman, mocked the anti-Trump Women’s March by asking on Facebook whether the protest would be “over in time for them to cook dinner.” That so upset Ashley Bennett, a 32-year-old health care worker, that she challenged Mr. Carman for his seat on the Atlantic County Board of Chosen Freeholders. “Elected officials shouldn’t be on social media mocking and belittling people who are expressing their concerns about their community and the nation,” she said during her campaign. If Mr. Carman does it again, it will be as a private citizen. Ms. Bennett defeated him on Tuesday.

In Hoboken, N.J., Ravi Bhalla became the state’s first Sikh mayor by triumphing over an ethnic smear campaign using fliers with his turbaned image and the message, “Don’t let TERRORISM take over our town!”

Plagued by division over a law that restricted transgender people’s access to public restrooms, and anger over the police shooting of a black man named Keith Lamont Scott, Charlotte, N.C., elected Vi Lyles, a 66-year-old former city administrator, as its first black female mayor.