Control of the Legislature in Virginia has shifted fairly frequently between the two parties during the past 30 years, and Republicans held on to leadership of the House of Delegates two years ago only after a race had to be decided by drawing a candidate’s name from a bowl.

Democrats say they can win back both chambers this fall. In recent years, Virginia has become more Democratic as suburbs around Washington, Richmond and Hampton Roads, Virginia’s so-called urban crescent, have grown and population declines have persisted in the state’s western, rural areas, which have traditionally been Republican.

Republicans say they can hold on to power by focusing on restricting access to abortions late in pregnancy and protecting gun rights in some areas of the state, while focusing on improving schools and cutting taxes in more moderate areas.

They have also reminded voters of a scandal that swirled around Democratic leaders this year.

Gov. Ralph Northam has struggled to recover politically after acknowledging that he appeared in a photograph either wearing blackface or dressed as a member of the Ku Klux Klan when he was a medical student in 1984. (Mr. Northam first admitted being in the photograph and then flatly denied it.) Two other Democrats, Justin Fairfax, the lieutenant governor, and Mark Herring, the attorney general, were also embroiled in scandal. Mr. Fairfax has denied allegations of sexual assault. Mr. Herring admitted to wearing blackface while in college.

Democratic Party leaders in Virginia, who have announced plans for what they describe as the state’s most expansive grass-roots campaign, say they will focus on setting new restrictions on guns, creating rules to outlaw housing and employment discrimination against L.G.B.T.Q. people and expanding environmental rules to combat climate change.

The candidates also plan to invoke the name of President Trump, who is unpopular in the state and lost to Hillary Clinton in 2016.