Tuesday was a primary election for the state of Virginia, with the polls closing at 7 p.m.

All 140 members of the state's House of Delegates and Senate were up for re-election, plus counties and independent cities also had fields of candidates.

The election results Tuesday have largely been expected to foreshadow the national races in 2020.

One of the first results to come in was that of the race for Commonwealth Attorney in Falls Church and Arlington. Parisa Dehghani-Tafti defeated incumbent Theo Stamos with a slim margin of less than 800 votes.

RELATED: Top prosecutor in Arlington and Falls Church loses bid for re-election

Dehghani-Tafti, who ran on a campaign of criminal justice reform, was one of the candidates that received hefty donations from the Justice and Public Safety PAC, which records show is predominantly funded by Democratic donor and billionaire, George Soros.  

The same PAC also donated to Steve T. Descano, who challenged incumbent Raymond F. Morrogh in the race for Commonwealth's Attorney in Fairfax County. Just before 10 p.m. Descano clinched the nomination ahead of Morrogh with 51 percent of the vote and 99 percent of precincts reporting. Descano also ran on a campaign of criminal justice reform.

The Washington Post reported Soros, as a criminal justice reform activist, views prosecutor races as "one of the most direct routes to changing policy because the local offices wield wide power over who gets charged, what charges they face and who goes free on bond."

The article continues after the election results below. Mobile users, if click here if you cannot see the results in the story.

Tuesday's primary, was billed as a battle for both Republicans and Democrats over their parties' identities and values. 

Worth noting, Virginia voters, no matter which party they identify with, can choose either party's ballot during a primary election. It is one of 22 states with open primaries. 

In one local race that speaks to the growing diversity of Virginia, all the candidates were first-generation Americans. The 87th House of Delegates district straddles Prince William and Loudoun Counties. It's been held a Democrat since 2013. Delegate John Bill is leaving the post to run for the state senate. 

The four candidates that ran to succeed Bell reflect the changing community surrounding Dulles Airport, which includes many south Asian and Latino residents.

Tuesday night, Suhas Subramanyam clinched the nomination for that district.

Subramanyam is a former technology policy adviser in the Obama administration. He is also the son of Indian immigrants.

"They came in through Dulles Airport. Dulles Airport was like their Ellis Island," Subramanyam told WUSA9 last week. "Since then, the communities have grown here, the communities of color have grown a lot."

RELATED: Former technology policy adviser to Obama administration wins Va. House of Delegates primary

This story has been updated.

Peggy Fox of WUSA9, and the Associated Press contributed to this article.