Prince William Democratic House candidates, top row, left to right: Jennifer Foy, Danica Roem, Elizabeth Guzman, Lee Carter, Hala Ayala. Their Republican opponents, bottom row, left to right: Michael Makee, Robert Marshall, Scott Lingamfelter, Jackson Miller, Rich Anderson. (Photos by Jennifer Foy campaign; Steve Helber/AP; Elizabeth Guzman campaign; Lee Carter campaign; Hala Ayala campaign; Michael Makee campaign; Steve Helber/AP; Dayna Smith for The Washington post; Bob Brown/AP) )

Hala Ayala, a Democrat vying to represent Prince William County in the state legislature, heard the usual gripes when she approached Susan Frederick outside the voter's tidy suburban townhouse: low teacher pay, congested commutes to federal jobs.

Then their chat turned intense.

Frederick, a 38-year-old naturalized citizen from the Caribbean, choked up as she recounted an officer’s demanding to see her paperwork during a routine traffic stop. Ayala also began to cry, recalling how she had to teach her son, who is black, how to interact safely with police.

They hugged.

“It’s nice to have someone who shares our background so they understand people who they are speaking for,” said Frederick, who is upset by President Trump’s handling of immigration.

Across the country, strategists are watching to see whether Democrats can convert voter disapproval with Trump into victory at the ballot box. The first clues may come in November in Prince William County, just the kind of fast-growing, suburban swing district prized by candidates from both parties.

In recent election cycles, Prince William has shifted from mostly white, rural and reliably Republican to diverse, developed and swingy — an example of a changing Virginia. The county voted for George W. Bush twice, then swung to Barack Obama, voting for him twice, and Hillary Clinton last year. It voted for Republican Robert F. McDonnell for governor in 2009, then swung to Terry McAuliffe four years later.

This election, a diverse Democratic slate is hoping to take advantage of those demographic and political shifts to challenge longtime, white male GOP incumbents in state legislative districts carried by Hillary Clinton last November.

They include a transgender woman taking on one of the legislature’s most conservative culture warriors, a Latina challenging a retired soldier, and one of the first black female graduates of Virginia Military Institute running against a local GOP activist and military contractor for an open seat.

In addition, Lee Carter, a white Marine Corps veteran who fits the more traditional Democratic-candidate mold, is challenging GOP House Majority Whip Jackson Miller, who just months ago lost a special election in Prince William in an upset seen as a wake-up call for Republicans.

Some say the Democratic Party’s best hope for resurgence lies in changing suburbs such as Prince William County.

“The center of gravity, so far, for Democrats in 2018 is suburban districts with voters turned off by Trump and embracing the changes and diversity in their community,” said Jesse Ferguson, a Democratic strategist with deep ties to Virginia.

For some, the historic nature of their candidacies is bringing national attention and dollars.

Danica Roem, who would be the first openly transgender person elected to the Virginia legislature, has raised more than $374,000, roughly four times as much as her Republican opponent, Del Robert G. Marshall.

The Latino Victory Fund has endorsed Ayala, whose father was an immigrant from El Salvador, and Elizabeth Guzman, an immigrant from Peru, to become the first Latinas elected to the legislature.

Both raised in the range of $150,000 in July and August, near the top of the list for House candidates.

But success is by no means a given.

Democrats face challenges including redistricting that has diluted the Democratic vote, in addition to well-established Republicans who wield the power of incumbency. And voter turnout in Virginia’s gubernatorial contests usually plummets from the preceding presidential year — a phenomenon that tends to favor Republicans.

“They have greater name recognition, greater ability to fundraise, and they have connections built over years of constituent services,” said Stephen Farnsworth, a political scientist at the University of Mary Washington.

Del. Richard L. Anderson R-Prince William), right, speaks to Don Palmer while canvassing in an unincorporated community near Manassas. Anderson faces Democratic challenger Hala Ayala in November. (Fenit Nirappil/The Washington Post)

Del. Richard L. Anderson, Ayala’s Republican opponent, is a case in point.

Anderson, who had twice as much cash as Ayala as of Aug. 31, had just finished knocking on a door in a Manassas neighborhood recently when he was accosted — in a friendly way — by Tim Jimmo.

“Rick Anderson! How are you?” Jimmo shouted from the passenger seat of his car.

It took Anderson a few moments to jog his memory.

“I saw you four years ago, and you offered me a hamburger and beer. And I said I would come back, and I did,” said Anderson, recalling his last contested campaign, in 2013.

“You did,” Jimmo replied.

“And we played corn hole,” said Anderson, 62, a retired Air Force officer.

“We did,” Jimmo grinned.

Jimmo, 46, is a union plumber who votes Democratic. He will do so again when choosing a governor in November. But he’s voting again for Anderson — a Republican he considers a neighbor and friend.

“On these local levels, it’s all about building personal relationships,” said Anderson, who estimates that he has met thousands of residents since winning his first campaign in 2009. “That’s how you can survive a changing community, and Prince William is a changing community.”

Del. Richard L. Anderson R-Prince William), right, greets constituent Tim Jimmo, a Democratic-leaning union member who plans to split his ticket to vote for Anderson, who faces Democratic challenger Hala Ayala in November. (Fenit Nirappil/The Washington Post)

A changing county

Prince William, now with more than 450,000 residents, is no longer the rural farming community and escape from city life it was decades ago.

The community 30 miles south of Washington includes tony gated communities, collections of townhouses largely occupied by working-class immigrants, and rural stretches with homes on several-acre plots.

Whites became the minority in 2010, and African Americans and Latinos each make up a little more than one-fifth of the population.

Former president Barack Obama ended his 2008 campaign with a rally in Prince William — choosing to finish his historic run in a community that reflects a multicultural America. The next day, he became the first Democrat since 1964 to carry the county and the state of Virginia.

Democratic House of Delegates candidate Jennifer Foy introduces herself to Annie Sajous, center, and her colleagues during a crab feast in Dale City. Foy is one of several candidates of color running in majority-minority Prince William. (Fenit Nirappil/The Washington Post)

Anna Hawkins, an 83-year-old Manassas-area resident and self-described “born and bred” Republican, is mystified by the concerted push by the Democrats in her county this year.

“It’s amazes me because I’ve been here in and out of the county probably 20 to 30 years, and it’s been pretty solid Republican,” Hawkins said. “When Obama came, I thought, oh, he’s cracking a barrier here.”

Even so, the county’s politics are complex.

Since 2006, voters have four times elected as county board chairman Corey Stewart — a conservative firebrand who led a crackdown on illegal immigration, chaired Trump's campaign in Virginia for a time and made protecting Confederate monuments his signature issue as he ran for governor and now for U.S. Senate. He softens his rhetoric and campaigns in minority areas during county election years.

Marshall, the county’s longest-serving Republican incumbent in the state legislature, is also one of the most socially conservative: He sponsored bills to ban same-sex marriage, bar LGBT people from serving in the state National Guard and to require transgender people to use restrooms that correlate with their sex shown on their birth certificates.

Tom Perriello, who ran unsuccessfully for the Democratic nomination for governor this year and now leads a PAC targeting seats in the House of Delegates, says exurbs are key to overturning the GOP's 66-to-34 majority in the chamber.

“The most radical right politicians in Virginia have not been coming out of my home area — it’s the Bob Marshalls and Corey Stewarts in areas like Prince William,” said Perriello, who represented central and Southside Virginia in Congress from 2009 to 2011.

Del. Timothy Hugo, the GOP caucus chairman, says Prince William Republicans win because they focus on local issues, such as fighting power lines set to run through the western edge of the county and a parkway to connect to nearby Loudoun County. And with a potential federal government shutdown averted, they don't fear a backlash to Republicans in a district brimming with contractors and federal workers.

Signs for Republican statewide and House of Delegates candidates are displayed outside the Prince William County Republican Headquarters in Woodbridge, Va. (Fenit Nirappil/The Washington Post)

“We localize every race,” said Hugo, whose district mostly covers Fairfax but stretches into Prince William. “They are talking about stop signs, and talking about schools. They are not talking about these national issues.”

Views on Latinos

Democratic House of Delegates candidate Elizabeth Guzman spent 15 minutes talking to James Gerrald while canvassing in Dale City. (Fenit Nirappil/The Washington Post)

Guzman, who administers programs for senior citizens and adults with disabilities for the city of Alexandria, said she wants to knock down stereotypes about Latinos.

Recent anti-Guzman mailers sponsored by the Republican House leadership have attacked her because she wants undocumented immigrants to be eligible for driver's licenses. One mailer features photos of bullet holes above text that warned, "If you fear this in your neighborhood, then you should fear this," referring to driver's licenses for illegal immigrants.

A spokesman for Republican House leadership did not respond to criticism from Democrats that the mailers promote negative views of Latinos.

“I want to advocate for hard-working families regardless of their race, but I am living in a place where Latinos have been targeted as undocumented criminals and gangbangers,” Guzman said. “I want to change that mind-set.”

In the aftermath of Clinton’s bruising loss as the first woman atop a major-party ticket, Democrats are debating whether the party bet too heavily on a changing American electorate while overlooking white working-class voters — the kind of people who flocked to Trump.

In Prince William, Del. Scott Lingamfelter, Guzman’s Republican opponent, said on his Facebook page that he had recently met a woman who claimed that Democratic canvassers told her she should vote for Guzman because she is a Latina.

“Well, for what’s it’s worth, that appeal fell flat with this voter, who reminded them, ‘I care only about the issues not your gender or your ethnicity.’ I suspect most folks agree with her,” wrote Lingamfelter, who declined an interview request.

Hugo, the Republican in House leadership, said lawmakers who understand their neighborhoods and constituents don’t need to fear buzzy challengers.

“A reflection of the community goes beyond race,” said Hugo, who is facing a challenge from African American businessman Donte Tanner. “If you are interested in the local issues, you do reflect the community.”