LuAnn Bennett (D), left, and Rep. Barbara Comstock (R-Va.) shake hands after their first debate in the race for Virginia’s 10th Congressional District in Lansdowne, Va., earlier this month. (Jahi Chikwendiu/The Washington Post)

Rep. Barbara Comstock received a friendly but subdued reception from the Muslim community Friday night at a candidates forum that focused on Islamophobia, immigration and improving relations with law enforcement.

Comstock (R-Va.), in the midst of a tightening race for reelection in her Northern Virginia district, told a crowd of several hundred at the ADAMS Center in Sterling that she fights for their rights and rejects the “very unpleasant” rhetoric of the presidential campaign.

But the liberal-leaning audience gave a warmer reception to Democratic challenger LuAnn Bennett, clapping loudly and nodding as she called for comprehensive immigration reform and said the United States needs to accept more refugees from Syria.

The forum came the same day Democratic presidential nominee Hillary Clinton’s campaign released a powerful ad featuring Khizr Khan, a Virginia resident and father of a Muslim American Army captain killed in Iraq in 2004, in which he says through tearful eyes, “I want to ask Mr. Trump: Would my son have a place in your America?”

Earlier in the day, Bennett announced that she had won the endorsement of the American Muslim Women PAC. At the forum, Comstock said she was endorsed by the Emerge USA PAC, which is dedicated to protecting minority rights. Both groups support Clinton.

Members of the civically engaged ADAMS — which stands for All Dulles Area Muslim Society — Center mosque represent a key voting bloc in the 10th Congressional District, which has been held by a Republican for decades, but this year is considered a “toss-up” tilting Republican by independent analysts.

The district is anchored by Loudoun County, home to many college-educated women and minorities who polls indicated are cool to Republican nominee Donald Trump’s candidacy. It includes Loudoun County, Manassas, Manassas Park and Clarke and Frederick counties as well as parts of Fairfax and Prince William counties, where the GOP presidential nominee has more support.

Last year, Trump called for a ban on foreign Muslims entering the United States — a position he later softened — and his running mate, Indiana Gov. Mike Pence, wants to keep Syrian refugees out of Indiana.

The day after Trump proposed the ban in December, Comstock panned the idea as “unconstitutional” and “un-American,” and she later criticized Trump’s negative comments about the Khan family and U.S. District Court Judge Gonzalo Curiel, the U.S.-born judge whose Mexican heritage Trump said disqualified him from hearing his cases.

But Comstock, who supported Sen. Marco Rubio (R-Fla.) in the GOP primaries, avoided saying for whom she would vote on Nov. 8 until earlier this month when a 2005 video surfaced in which Trump bragged about groping women. She quickly rebuked him, said she would not vote for him and urged him to drop out of the race.

“This has not been a pleasant political year for anybody,” she said at the forum. “What you have heard has been very unpleasant. This is why I did stand up in those first days.”

Asked about immigration changes, Comstock said she favored immediate passage of policies lawmakers can agree on — such as visas for skilled workers — instead of a comprehensive approach.

“We are a nation of immigrants. We are also a nation of laws,” she said.

When moderators noted that she did not support a House resolution sponsored by Rep. Don Beyer (D-Va.) condemning hate crimes against Muslims, Comstock said she would look at the measure. Earlier, she noted that the First Amendment guarantees religious freedom.

“It’s first for a reason,” she said.

Comstock praised the center’s active Scout troops, food banks, health clinic and job fair and presented the group with an American flag that was flown over the U.S. Capitol.

The format of the event consisted of sequential interviews with each candidate, who answered questions from moderators and the audience.

Comstock made no reference to Bennett during her interview, but Bennett sought to draw a contrast between her positions and Comstock’s record.

She said Comstock voted against bringing more Syrian refugees to the United States, drawing one of the few boos of the evening.

Bennett said the United States should take more than the 10,000 Syrian refugees President Obama has accepted under a resettlement program, while continuing to implement a “long and complicated and hard” vetting process.

Asked about immigration, she rebuked the House for failing to pass sweeping immigration changes before Comstock took office but provided no plan of her own.

Although she never mentioned Trump, Bennett alluded to the national political climate and said Clinton needs Democrats in Congress to further her policies.

“The hateful rhetoric that we have heard in this election has been the most destructive thing to our democracy that I have seen in my lifetime,” she said.

During the lighthearted final minutes of each candidate’s interview, they were asked to name their favorite book. Comstock said the Bible; Bennett said she could not think of one on the spot and would get back to them.