RICHMOND — Virginia Democrats are on to the next battle — this time within their own party — as four candidates fight to become speaker of the House in the chamber they flipped in Tuesday’s election.

There is an internal skirmish among House Republicans, too, in the aftermath of an Election Day that gave Democrats control of the House of Delegates for the first time in a generation. With Speaker Kirk Cox (R-Colonial Heights) uninterested in serving as minority leader, two Republican delegates are vying for that post.

For both parties, the internal contests turn on competing visions for how to move forward in the aftermath of a political earthquake. The upheaval was welcome, of course, for Democrats, who also flipped the Senate on Tuesday and will have full control of state government along with Democratic Gov. Ralph Northam. But the process of picking a speaker is still fraught, exposing intraparty fractures along ideological, racial, regional and gender lines.

The four contenders for House speaker include two women and two men, two of whom are white and two of whom are African American. Three of the contenders are from Northern Virginia, the affluent and solidly Democratic suburbs that now have the largest delegation in Richmond. One is from Petersburg, a struggling city. Some are major recipients of corporate cash; others have publicly sworn off money from Dominion Energy, the state’s largest corporate donor.

The race, which will be decided by secret ballot at a closed-door caucus meeting Saturday, is such a touchy subject that few Democrats were willing to discuss it on the record. “Race, gender, geography — wouldn’t get near it,” one Democrat said in a text when asked to weigh in. “Game of Thrones anyone?”

For Republicans, who lost six seats Tuesday on top of 15 that slipped away in 2017, the minority leader contest plays out under a cloud: A party that just four years ago enjoyed a 66-seat majority will have just 45 come January.

GOP delegates are looking for a leader who can guide them not just in Richmond’s lower House, but also out of the political wilderness. The minority leader will need to recruit candidates and find a way to win back the suburban women who have deserted the party in droves since the election of President Trump.

Both Republican contenders are white men from rural parts of the state: One is considered a staunch conservative, the other a deal-cutting pragmatist.

There has been no call for a shake-up in leadership in the Senate, where control has flipped back and forth a few times over the past decade. Democrats picked up two seats in the upper chamber Tuesday, giving them a 21-to-19 edge there. Senate Minority Leader Richard L. Saslaw (D-Fairfax) and Senate Majority Leader Thomas K. Norment (R-James City) are expected to swap titles, with no apparent push for new leadership from within either caucus, members said.

In the battle for House speaker, the contenders are Minority Leader Eileen Filler-Corn (Fairfax); Del. Lashrecse D. Aird (Petersburg); Del. Luke E. Torian (Prince William); and Del. Kenneth R. Plum (Fairfax).

Filler-Corn, 55, who assumed the minority leader role in January, is thought to have the inside track by virtue of that post. She raised more than $1 million for candidates running in this cycle and crisscrossed the state to stump with them, so she may have the support of newcomers.

“I think my record speaks for itself,” said Filler-Corn, who took office in 2010 and would become the first female speaker. “I’m an inclusive leader. I focus my leadership on bringing people together … and also making sure all my members are able to shine.”

Aird, 33, who also hit the campaign trail for fellow Democrats, said she has the ability to unify the party and work across the aisle, noting her work with a southwest Republican on a law to help the poor in their districts. A delegate since 2016, she would become the first black speaker, as well as the first woman.

“I strongly believe that that [black female] electorate deserves reflective leadership,” Aird said. “I think that [given] everything that the commonwealth has represented throughout its 400 years, as we make a shift into the next 400 years, taking the time to show that we are a new Virginia is critical.”

Aird’s ascension would underscore the role within the Democratic Party of black women, one of its most reliable voting blocs. But it would also come in a year that began with a blackface scandal that enveloped Northam and Attorney General Mark R. Herring (D) and sexual assault charges made by two women against Lt. Gov. Justin Fairfax (D), which he denied. In the turbulent weeks afterward, some Democrats talked quietly about elevating a black woman as a reset.

Torian, 61, did not respond to messages seeking comment. A member of the Legislative Black Caucus, he is the ranking member of the House Appropriations Committee and is likely to assume the chairmanship if he does not become speaker. A minister who has been in the House since 2010, Torian has pitched himself as someone who has been chummy with Republicans. Part of the case for him, Democrats say, is that the GOP might be less inclined to pounce on mistakes — they will be inevitable for a party that has been out of power so long — if Torian wields the gavel.

Plum, 78, first won election to the House in 1978. He lost his first bid for reelection but came back in 1982 and has been in office since.

Well-respected and liked, he is pitching himself as an almost nonpartisan traffic cop who could keep legislation flowing and help the House get its work done.

“I think I have the temperament for the job,” he said. “I have a vision of what would make for a successful legislative body that I think would be responsive to the public clamor that we do some things in Virginia.”

Bob Holsworth, a longtime Richmond political analyst, said Filler-Corn is probably the favorite “because of her current role and because of her importance in the campaign as a supporter and fundraiser for other Democrats. At the same time, I think Aird is connected to a lot of the new, young, progressive Democrats who want a seat at the table.”

“Some of the younger Democrats who have been elected in the last four years in particular believe they’ve given tremendous energy and vitality to the party and don’t want simply a Democratic version of business as usual,” he said.

The Republicans vying for minority leader are Del. Todd Gilbert (Shenandoah), the current majority leader; and Del. Terry G. Kilgore (Scott), chairman of the Commerce and Labor Committee.

Both are agile debaters. Gilbert, 49, cultivates an intimidating image, although he is personally friendly with some of the chamber’s most liberal Democrats. Kilgore, who hands out tongue-in-cheek awards that poke fun at legislators from both parties at the end of each session, has a softer touch.

Both have conservative voting records, but Kilgore helped lead the Republican caucus to support Medicaid expansion in 2017. Gilbert never budged on the issue.

As the House’s current majority leader, Gilbert is expected to have the advantage in that contest, which will be decided at a caucus meeting on Nov. 17. He signaled a hard-edge approach in a written message released after the election, promising to fight the Democrats’ “extreme agenda … at every turn.”

Kilgore, 58, has not publicly confirmed that he is seeking the post and did not return messages seeking comment, but he has been making calls to drum up support, according to two people familiar with his efforts, who spoke on the condition of anonymity to discuss strategy.

He is promoting himself as a “big-tent” figure, contending that the GOP needs more ideological diversity to appeal to moderate voters in suburban areas, according to one person familiar with his pitch.

“Their challenge is to think about who the best person will be, not simply to unify a caucus in the legislature, but … to begin that process of developing candidates to reclaim the suburbs,” Holsworth said.