Virginia Democratic voters signaled impatience with establishment politicians in primary elections Tuesday, sending home one high-profile state Senator who had been embraced by top leaders and giving the scare of a lifetime to another.

Sen. Rosalyn R. Dance (D-Petersburg) lost by a wide margin to former delegate Joe Morrissey for the nomination in her district outside Richmond after campaigning with Gov. Ralph Northam, former governor Terry McAuliffe and U.S. Sen. Tim Kaine.

And Sen. Richard L. Saslaw (D-Fairfax), the Senate minority leader, clung to the nomination for his seat by a whisker over novice challenger Yasmine Taeb, his first primary opponent in 40 years.

In Republican primaries, conservative ire aimed at two incumbents who voted last year to expand Medicaid wound up with split results. Sen. Emmett W. Hanger Jr. (R-Augusta) easily won the nomination over hard-line challenger Tina M. Freitas in his largely rural district around Harrisonburg.

But in the growing exurbs outside Fredericksburg, Del. Robert M. Thomas Jr. (R-Stafford) lost to challenger Paul V. Milde III.

Voter turnout was reportedly light as nominating primaries took place in 18 House districts and 14 Senate districts around Virginia on a warm, sunny day.

Voters seldom show up in big numbers for Virginia’s off-off-year primaries, when no presidential or gubernatorial races are on the ballot. But this year carries added significance because control of the General Assembly could be at stake in November. All 140 seats in the legislature will be on the ballot then, with Republicans trying to protect two-seat majorities in the Senate and House of Delegates.

While most incumbents facing challengers prevailed Tuesday, the occasional fireworks highlighted deep intraparty tensions, especially for Democrats.

Saslaw’s scare in the blue stronghold of Fairfax suggests the rising power of the liberal wing of the party in Virginia.

Voters seem increasingly frustrated with the type of Democrat “that gave them success for a long time — that Democrat who was pro-business on economic issues and progressive on social issues,” said political analyst Bob Holsworth. “The consensus about that being the way the Democratic Party should position itself is eroding not only nationally but in Virginia.”

Taeb, 39, a human rights lawyer, was endorsed by the Democratic Socialists of America and advocated decriminalizing prostitution and abolishing the U.S. Immigration and Customs Enforcement agency. She criticized Saslaw for taking large donations from Dominion Energy.

Her energetic challenge forced Saslaw, 79, to campaign relentlessly. On Tuesday, his frustration was evident as the two encountered each other outside a polling place at the Falls Church Community Center.

“The lying started the day she got into this thing, and it hasn’t stopped since,” Saslaw said, with Taeb standing about 15 feet away.

Taeb said her campaign faced a series of roadblocks — from mail firms that didn’t want to work with an insurgent candidate to Saslaw’s colleagues encouraging her not to run.

“The reason why we’re in this race is to say that that’s just not acceptable,” she said. “Every person has the right to run for office if they feel as though they have something to offer to the residents of their district, to serve the public good.”

Voter Marsha Hertzberg, 64, said she considers Saslaw’s decades of experience in Richmond an asset and she trusts his judgment.

“I think he has represented our district well, and I have no reason to not continue to support him,” she said. “I am not of the belief that, ‘Kick everyone out who’s of a certain age or who has been there a long time.’ ”

But Adriana Ray, 26, a think tank worker, said she voted for Taeb because she represents a “new wave” of Democrats challenging mainstream candidates at the local and national level.

Herb Calhoun, 78, a retiree, said he wants to see what young female leaders can do for Fairfax County.

“I didn’t vote for the old guys, I’ll tell you that,” he said. “I’m tired of Saslaw, so I voted against him. He knocked on my door really hard this time.”

The anti-establishment sentiment did not seem to bring out a big wave of voters.

Arlington County officials estimated turnout at 16.95 percent.

Many voters for Arlington’s two contested General Assembly seats split along generational lines. In both cases, Democratic incumbents — state Sen. Barbara A. Favola and Del. Alfonso H. Lopez — were challenged by newcomers to electoral politics. Favola beat Nicole Merlene, while Lopez easily dispatched J.D. Spain.

Laura McDonald, 30, who was voting at Lyon Park Community Center, cast her ballot for Merlene, whom she found to be “generally more approachable and open to community input.”

Morgan Grogan, 27, agreed. “Favola seems like she’s done a good job, but I like that [Merlene] is an outsider and maybe more progressive,” Grogan said.

But Jerry Smaldone, 79, said Favola “has been a very good representative in the Senate, as far as I’m concerned. She’s got the experience, and she listens to what voters want.”

Across the county, at Campbell School along Carlin Springs Road, retiree Linda LeDuc said she favored both incumbents.

“I’ve known Alfonso a long time, and he knows his stuff,” she said. “Favola does, too. Both are very approachable.”

In the Richmond area, Morrissey’s challenge to Dance was perhaps the state’s most unusual primary race.

The Democratic establishment came out heavily for Dance in the solidly African American district, which stretches from Henrico County along the eastern edge of Richmond through Hopewell and into Petersburg. She is a black former Petersburg mayor who appeared repeatedly with Northam despite the governor’s scandal over a racist photo from his medical school yearbook and his admission that he darkened his face for a youthful dance contest.

She also appeared with Kaine and held a fundraiser with McAuliffe, who has stepped in to help Democratic candidates because of Northam’s compromised position. But Morrissey was able to damage Dance by associating her with deep social and economic problems that plague her hometown of Petersburg.

A former defense lawyer who lost his license, Morrissey is white and spent time in jail after he pleaded guilty to contributing to the delinquency of a minor. Prosecutors said he had sex with his then-17-year-old receptionist. He was 56 at the time.

Now married to the former receptionist and fighting to get his law license back, Morrissey has deep support among some African American residents because of his legal work in the community.

“Morrissey thumbed his nose at the establishment and basically suggested to people that he had a lot of empathy,” Holsworth said. “He localized the election. . . . He suggested that Dance was part of the reason that Petersburg was suffering.”

The message cut through concerns voters may have had about Morrissey’s past.

Donnie D. Jackson, 61, a nursing assistant, cast her ballot for Morrissey at Woodville Elementary School in Richmond.

Jackson said she saw Morrissey many times when he paid visits to senior housing developments where she works. He recently knocked on her door to ask for her vote.

“He gets out to the people,” she said. “I liked him, and I like his ideas.”

Jackson said she was displeased that Morrissey had a relationship with an underage girl, but she was willing to look beyond that — particularly because he married her. “The past is in the past. We need the future now,” she said.

Pamela Irving, 49, spent Tuesday outside Woodville handing out green sample ballots that billed Dance as “a fierce Democratic champion for the people.”

But Irving, who is unemployed, said she would not be disappointed if Morrissey prevailed.

“I pretty much like both of them,” she said.

She recalled Morrissey visiting Creighton Court, the nearby public housing project where she lives, when he ran for Richmond mayor a few years ago. There was a cookout, with music, and Morrissey was all in.

“Me and Joe Morrissey danced together,” she said. “He can dance, too.”

Patricia Sullivan contributed to this report.

An earlier version of this story incorrectly reported that Yasmine Taeb was a first-time candidate who supports legalization of prostitution. She ran unsuccessfully in a Democratic primary in 2014 and supports decriminalization of prostitution. This story has been updated.