Democrats have won two significant victories in the US in the first statewide elections since Donald Trump came to power.
Democrats have been eager for positive news after defeat in four congressional special elections this year.
Analysts are taking the results as an early indication of how next year’s midterm congressional elections could turn out, despite a surge in grassroots opposition to the US president.
What happened where
In Virginia, Ralph Northam defeated Republican Ed Gillespie in a governorship contest defined by differences over immigration and Confederate status.
The Democrat offered to work with President Trump. He had previously called him a “narcissistic maniac”.
Voters in the state also made history by electing their first openly transgender state legislator.
The 32-year-old journalist and stepmother Danica Roem ousted a long-time, pro-Trump Republican.
The new governor of New Jersey will be Phil Murphy, who saw off competition from Kim Guadagno. The incumbent, Republican Chris Christie, has been in the post for eight years.
New York City Mayor Bill de Blasio was re-elected comfortably.