A competitive race in Virginia’s 10th Congressional District has an alarming new element: anonymous attack ads on Facebook.

The ads, which appeared on a Facebook page called “Wacky Wexton Not,” were purchased by a critic of Jennifer Wexton, a Democrat trying to unseat Representative Barbara Comstock, a Republican. The race is one of the most closely watched in the country.

The ads paint Ms. Wexton as an “evil socialist,” with language and imagery not typically found in even the roughest campaigns. In one ad, which began running on Monday, Ms. Wexton is pictured next to an image of Nazi soldiers, and the ad’s text refers to her supporters as “modern-day brown shirts.” In another, which first ran this month, Ms. Wexton is compared to Christine Blasey Ford, the woman who accused the new Supreme Court justice, Brett M. Kavanaugh, of sexual assault. The image is captioned: “What’s the difference??? Nothing!! Both are liars.”

The person or group behind the ads is known to Facebook, but a mystery to the public. The funding disclaimer attached to the ads reads, simply, “Paid for by a freedom loving American Citizen exercising my natural law right, protected by the 1st Amendment and protected by the 2nd Amendment.” There is no other identifying information on the page.