A cyclist who was fired after making a rude single-fingered gesture to US President Donald Trump's motorcade, has been elected to local office in Virginia.

Juli Briskman, whose one-handed salute was captured in an AFP photograph that went viral, beat the Republican incumbent to a seat on the Loudoun County Board of Supervisors.

The state elections saw Mr Trump's Republican party suffer a series of stinging defeats.

Ms Briskman lost her job as a marketing analyst for a US government and military subcontractor after the snapshot of her gesture spread across media and the internet in 2017, bringing her insults and threats.

But getting fired also opened "a lot of doors", the 52-year-old said during her campaign, including accepting an invitation to run for local office on the Democratic ticket.

That decision paid off last night, as Ms Briskman celebrated her victory in a tweet that linked to a copy of the image.

"Looking forward to representing my friends & neighbours in #Algonkian District who backed me up today! So proud that we were able to #FlipLoudpun," she wrote.

With 52% of the vote after 99% of precincts had reported, the result saw Republican Suzanne Volpe beaten into second place.

When fighting her campaign in Loudoun County - the wealthiest in the US - Ms Briskman did not bring up the image that sparked her 15 minutes of fame unless homeowners started "talking about the administration" or commented on her bicycle pin.

Instead, she said she wanted to show that there was "substance" behind her candidacy - education, women's rights, transportation and environmental issues - and that she wasn't "just the person that rode my bike one day and flipped off the president".

Her success comes as Mr Trump's party also lost control of both chambers of the legislature in increasingly blue Virginia, US media including projected.

Democrats will now hold all major statewide offices and rule the state assembly, a comprehensive consolidation of power not seen in the state since the 1990s.