The Democrats’ hopes of winning control of the US Senate have been dealt a blow in the mid-term elections.
A Donald Trump Republican ally is projected to unseat an incumbent in Indiana, but Democratic senators held on in West Virginia and New Jersey.
Democrats also scored significant gains in the House of Representatives, including two districts seized by the party in Virginia and Florida.
Republicans currently control both legislative chambers.
President Trump is not up for re-election until 2020, but Tuesday’s poll will shape his agenda for the remainder of his two years in office.
What’s happening in Senate races?
Republicans look likely now to retain control of the Senate – they currently have a slim 51-49 majority, but only nine of the party’s seats were up for grabs, while Democrats were defending 26 seats.
Republican Mike Braun was projected to oust incumbent Joe Donnelly, a moderate Democrat in Indiana.
White House press secretary Sarah Sanders said Mr Trump had “closed the deal” for Mr Braun after holding a rally in the state on Monday night.
Republican Marsha Blackburn won a Senate seat in Tennessee against Democrat Phil Bredesen, who was endorsed by pop star Taylor Swift.
There was some consolation for Democrats as Senators Joe Manchin and Bob Menendez held on to their seats after tough campaigns in West Virginia and New Jersey respectively.
A cliff-hanging vote count in Florida has Republican Rick Scott neck and neck with incumbent Democratic senator Bill Nelson.
There is no result yet from another closely watched Senate race. Republican Ted Cruz is up against a stiff challenge from rising Democratic star Beto O’Rourke.
What’s happening in House races?
Democrats are expected to win the 23 seats they need to take over the House of Representatives, and possibly 15 or so extra seats.
Americans voted for all 435 seats in the House.
In suburban Virginia, Democrat Jennifer Wexton ousted incumbent Republican Barbara Comstock, while another Democrat, Donna Shalala, flipped a Florida constituency against Republican Maria Salazar, a news anchor.
But Democratic candidate Amy McGrath, a retired Marine fighter pilot, lost against third-term Republican Rep Andy Barr in a Kentucky district, a state Mr Trump won by double figures two years ago.
If Democrats do win the House, they are expected to launch investigations into Mr Trump’s administration and business affairs, from tax returns to potential conflicts of interest, while thwarting his legislative agenda.
What’s happening in governors’ races?
Governors are also being chosen in 36 out of 50 states.
The Sunshine State’s governor race is too close to call between a left-wing progressive, Andrew Gillum, and a Trumpist conservative, Ron DeSantis.
Democratic candidate Stacey Abrams could become the first female African-American governor in the US. Her Republican opponent Brian Kemp’s office has been accused of voter suppression.
To add to polling day tensions, broken voting machines led to longer queues and a return to paper ballots in some parts of the state.
Senate door closing on Democrats
Analysis by Anthony Zurcher, BBC News
Democrats always faced an uphill fight in the Senate, with 10 incumbents running in states that Donald Trump carried in 2016. Even though the president won Indiana by 16%, Joe Donnelly was supposed to be one of the endangered candidates with a better chance to hold on.
Instead, he was the first to fall.
Mr Trump barnstormed the critical Senate battleground states in the final days of the campaign, effectively making the contests as much about him as they were about the individual candidates. It appears to have been an effective strategy in places like Indiana and Tennessee.
In West Virginia, however, Joe Manchin continued to defy political gravity by holding on to his seat. And in other previously Trump-friendly 2016 states – Wisconsin, Ohio and Pennsylvania – Democratic incumbents breezed to victory. In all it makes for a muddled picture that as much reflects regional identities, demographic differences and specific candidate strengths as it does Mr Trump’s political power.
It also, however, nearly closes the door on Democratic hopes to retake the Senate. In a best-case scenario, a political tailwind would push all the at-risk candidates across the finish line. Instead, some survive while others falter.
What you need to know about mid-terms:
- Your simple guide to the US mid-terms In case you’re just joining us
- Why US mid-term elections matter The big issues explained
- Hour-by-hour guide to election night What to expect when
- Can we tell yet who has the edge? Analysis of what we know so far
- Follow the US election on the BBC How to keep up with the results
How has voting unfolded?
After months of campaigning and billions of dollars in spending on adverts, leaflets and bumper stickers, voters came out in force.
Around 40 million people cast early ballots according to the US Elections Project, a University of Florida-based information source. That figure in 2014 was just 27.5 million.
In Texas, early voting exceeded the entire turnout in 2014.
Some states showed signs of being overwhelmed by the voter influx, however.
The Associated Press reported a wave of electronic voting machine failures and congested polling stations after voting opened – including in Georgia, Atlanta, Arizona, and New York.
A Homeland Security official said the department had received “sparse” reports of tech failure, but that there seemed to have been no significant impact on people’s ability to vote.
US mid-term elections 2018: Senate slipping from Democratic reach