RICHMOND — Two first-time officeholders — a socially liberal Democrat and a conservative Republican — are about to join the Virginia Senate.

By chance, each already has a good friend at the Capitol: the other.

Sens.-elect Ghazala F. Hashmi (D-Richmond) and Jen A. Kiggans (R-Virginia Beach), met and hit it off in March at a week-long candidate training program at the University of Virginia’s Sorensen Institute for Political Leadership. In November, each prevailed in harshly partisan contests in suburban swing districts.

“I’ve known her longer than anyone else in politics,” said Kiggans, a nurse practitioner, former Navy helicopter pilot and mother of four. “I think we both drive minivans. We’ve never done politics before. We just both felt like we could do better, and we have things to offer that were maybe missing.”

Hashmi, a former literature professor, community college administrator and mother of two, said she was “excited when [Kiggans] decided to run even though she was running on the other side.”

“Just the fact that she felt empowered and she had such a remarkable story herself — her military career, her nursing career, she’s raised four children,” Hashmi said. “She’s a woman that I think any woman can admire and respect for all that she’s accomplished.”

Kiggans, 48, is a lifelong Republican who was voted “most politically inclined” at her Orlando high school. But she had never engaged in party politics or considered running for office. Her unlikely inspiration: a Democrat, now-U.S. Rep. Elaine Luria, a fellow Navy veteran and political newcomer who unseated Republican Scott W. Taylor in 2018 in a district that includes Virginia Beach.

Tired of “division in the country,” Kiggans decided it was time to “get off the couch.”

Hashmi, 55, was born in India but moved with her family at age 4 to the United States, where her father taught political science at Georgia Southern University.

“The only thing we talked about at the kitchen table was politics, especially national politics, American government,” Hashmi said. “I always knew who was running for president and what to be looking for in terms of the issues.”

In 1987, while working on her PhD at Emory University, Hashmi got involved in civil rights marches in Forsyth County, northeast of Atlanta, where no blacks had lived since whites violently drove them out in 1912. But political activism eventually took a back seat to career and family.

Barack Obama’s 2008 campaign inspired her to get active again — this time in Richmond, where she and her husband had moved as newlyweds two decades earlier. She worked the phones for Obama again in 2012, but she did not volunteer in 2016, assuming Democrat Hillary Clinton had her race “in the bag.”

Donald Trump’s victory jolted Hashmi, who will be the first Muslim in the Virginia Senate and the first Muslim woman in either chamber, into more intense political action. She organized conferences related to being Muslim in the United States. She volunteered for a state legislative race in 2017 and a congressional contest in 2018. By 2019, she was on the ballot herself.

At Sorensen, which runs a variety of nonpartisan leadership programs, Hashmi said she and Kiggans forged a special bond with each other and the other women in the group “in spite of our different political alignments.”

“We just all connected fundamentally as women — sharing, of course, concerns about our families, our different communities and thinking about the ways in which the issues and decisions that are being made are impacting the lives of our children,” she said.

Kiggans and Hashmi did not communicate much as they became immersed in their races, but they followed each other’s campaigns. Each was labeled “radical” by her opponent. In the end, Kiggans defeated Del. Cheryl B. Turpin (D-Virginia Beach) for the seat vacated earlier this year by Sen. Frank W. Wagner (R-Virginia Beach). Hashmi unseated Sen. Glen H. Sturtevant Jr. (R-Richmond).

Now they are back in touch. They saw each other for new-member Senate orientation in Richmond in early December, leaning on each other as the two true newbies in the freshman class of five. The others are Del. John J. Bell (D-Loudoun), who won the seat vacated by retiring Sen. Richard H. Black (R-Loudoun); Del. Todd E. Pillion (R-Washington), who will replace retiring Sen. Charles W. “Bill” Carrico Sr. (R-Grayson); and former delegate Joseph D. Morrissey (D), who ousted Sen. Rosalyn R. Dance (D-Petersburg) in a primary.

“ ‘Hey, do you know where we park?’ Things like that. Even our log-in to file bills,” Kiggans said, when asked what they talked about ahead of orientation. “It was nice to see a friendly face and see another person I’ve known a while.”

Both say they expect to be able to collaborate on some issues.

“We live in tight districts,” Kiggans said. “I am a conservative Republican by nature, but I also feel I was chosen to represent people in the 7th District. As a party, if we want to talk about getting the majority and keeping the seat, we need to pay attention to that.”

Hashmi, who has endorsed Sen. Elizabeth Warren (D-Mass.) for president, thinks her political differences with Kiggans will not stand in the way of working together.

“If we ever want to accomplish anything, there has to be collaboration across a pretty broad spectrum of people,” Hashmi said. “And I think the public wants to see that.”