MADISON, Va. — At a church the size of a warehouse at the end of a rural dead-end street, Bob Good was preaching to the preachers.

It was a sunny afternoon near Shenandoah National Park, and Good, the Republican nominee in Virginia’s 5th Congressional District, had come to Fellowship Baptist Church to warn a small group of church leaders that, as one invitation to his “Pastor Summit” put it, “your religious liberties are under assault.”

Another invitation made clear what Good, 54, believes to be at least one culprit: the Virginia Values Act, which made the state the first in the South to protect members of the LGBTQ community from discrimination in housing, employment and places of public accommodation.

“What happens when a male member of your congregation goes on vacation and returns 4 weeks later as a female?” said one email invitation sent by Pastor Travis Witt, the Good campaign’s faith coalition leader and former leader of Virginia’s tea party, and reported by the New York Times ahead of the event.

Protesters with the left-leaning group Indivisible Charlottesville took to the streets on Tuesday to condemn the anti-transgender rhetoric, flying rainbow flags and holding signs supporting Good’s Democratic opponent, Cameron Webb.

Behind the scenes, some moderate Republicans were recoiling, too.

Good’s Pastor Summit was exactly the kind of culture-war-centric event that analysts say could make the usually red congressional seat vulnerable in November, leaving Webb plenty of room to siphon votes from moderate Republicans.

The race was upended in June when Good, a self-described biblical conservative, ousted first-term Rep. Denver Riggleman (R) in a bitter nominating convention. Riggleman had drawn ire from far-right factions in the state party after officiating at the same-sex marriage of two of his former campaign volunteers in 2019.

Two weeks after Good defeated Riggleman — in a convention held at a church and in a part of the sprawling district that is home to Good’s conservative religious base — Webb trounced three primary opponents, winning two-thirds of the vote in a performance that analysts said illustrated the strength of an energized Democratic electorate.

Now Webb, a 37-year-old doctor and health policy professor at the University of Virginia, is reaching out to Republican-leaning voters, emphasizing his experience as a White House fellow that spanned the Trump and Obama administrations.

Republican supporters of Riggleman, who leans Libertarian, say Good needs to move to the center, too.

“It’s one of those things where we know that the district can swing blue, and we have to talk to independent voters. And Bob Good is not doing that at the moment,” said Matt Hall, a senior contributor at the conservative Virginia politics blog Bearing Drift, which hosted Webb on its podcast Friday.

“A lot of middle-of-the-road Republicans are going to have a hard time supporting someone who’s waging culture wars like Bob is,” Hall said. “He will lose those moderate voters. That is not a question. That is not an if. It’s a when.”

Webb emphasizes his background as a scientist, whether he is discussing the need to reduce carbon emissions or solutions to the health crisis triggered by the coronavirus pandemic. His platform includes adding a public option to expand health-care access and calls for racial justice and criminal justice reform.

“What I’m advocating for is very practical, very pragmatic, and that’s what resonates with Riggleman supporters that I’ve spoken to,” he said in an interview.

Good, a former Campbell County Board of Supervisors member and Liberty University athletics official, described himself as a born-again Christian with a “biblical world view.” He opposes abortion in all circumstances, including rape and incest, and speaks against “birthright citizenship,” framing his immigration platform around President Trump’s “America First” mantra and protecting domestic jobs. As a county supervisor, he signed resolutions opposing the Supreme Court’s decision on same-sex marriage and another seeking to regulate transgender bathroom use.

Although he is running for Congress, the invitations to his Pastor Summit attacked a state law passed this year by the Virginia General Assembly’s newly ascendant Democratic majority, which includes Del. Danica Roem (D-Prince William), the first openly trans state lawmaker elected in the country.

Good stressed that his presentation was not focused on transgender people but on “Judeo-Christian principles,” saying he intended to “inform pastors on the importance of this election” and of their First Amendment religious freedoms.

The Virginia Values Act, he said, had the “potential” to infringe on those religious freedoms when the LGBTQ anti-discrimination provisions are applied to churches or other religious entities. He added that nobody should face discrimination in housing or employment.

“I love everyone. I treat everyone with dignity and respect and appreciation and value,” Good said. “But I do think that it’s very important for religious entities to be protected in their ability to make decisions that are consistent with their faith.”

Tuesday’s event was closed to the public, and the pastor hosting it declined to answer questions. Another pastor, Seth Lackey of Faith Memorial Church, said the event was about “understanding the First Amendment rights we have and how we can better administer to our congregations.”

“Any law that would rob us of the freedom to be able to worship in a way that pleases God is always a concern,” Lackey said, emphasizing that he wasn’t speaking exclusively about the Virginia Values Act.

Good’s campaign said educational materials were distributed from the conservative Family Research Council, which the Southern Poverty Law Center designates as an anti-LGBTQ hate group that adheres to the “biblical principles of sexuality.”

Cynthia Dunbar, who has served as Virginia’s representative to the Republican National Committee and who, as a former Texas education elected official, led a push to teach the “strengths and weaknesses” of evolution in public schools, was one of the speakers.

In an interview afterward, Good denied knowing about the invitation to the event sent by Witt, which in addition to talking about parishioners changing their gender identity warned of a “man dressed as a woman” wanting to use the women’s restroom at church.

A campaign representative confirmed that Witt sent the invitation and said the email did not go through proper approval channels.

The rhetoric is too much for Riggleman supporters like Michael Nagy, a high school government teacher in Campbell County, who said he will support Webb in part because of the way Good infuses his faith into his social policy positions.

“It’s not that I care if candidates have faith, but if they want to make their faith their policy, that’s where I draw the line,” Nagy said. “Mr. Good is someone who would attempt to use his religion to discriminate against people or use his faith to make policy, which disgusts me in every way.”

Good’s convention victory led the Cook Political Report to downgrade the race from “likely Republican” to “leans Republican.”

But Melvin Adams, chairman of the 5th Congressional District Republican Committee, said Good’s views on LGBTQ issues and religious liberties align well with those of many voters in the district. He conceded that Good may lose some centrists, like Nagy, but predicted victory in November.

“Do we like to lose anybody? Absolutely not,” he said. “However, let’s be clear: I believe the majority of the conservative base are going to be with our candidate around traditional values.”

Stephen Farnsworth, a political science professor at the University of Mary Washington, said disaffected moderates in the sprawling district could end up being the deciding votes — if Webb can muster the strategy and the resources.

“There is clearly an element of the Republican Party that would be more pro-Riggleman than pro-Good in the district,” Farnsworth said. “The challenge for Webb will be reaching those people and offering them an effective message.”

Good said Tuesday that he is looking forward to debating Webb to highlight what he described as the extreme contrast between them.

Hall, the Riggleman supporter and conservative blogger, urged Good to steer the conversation toward “kitchen-table issues” affecting everyday Americans rather than “waging a culture war in the middle of an economic pandemic.”

“I would really encourage Bob to reach out to these moderates and actually talk to them,” Hall said. “Cameron Webb is talking to the moderates. He’s talking to the disaffected Republicans. And if Bob Good doesn’t do it, he’s a goner.”