Votes are counted at the Pennsylvania Convention Center on Election Day in Philadelphia, Pennsylvania. [Reuters]

The outcome of the U.S. presidential election hung in the balance on Wednesday as several states continued to count their ballots, including some of the most competitive battlegrounds where the tally could take days to complete.

Democratic nominee Joe Biden has a slight edge over Republican President Donald Trump with 227 to 213 electoral votes. That leaves 98 electoral votes to be allocated, and possible paths to victory for both candidates. The winner needs to secure 270 votes.

Here is the state of play in nine states. The vote counts are supplied by Edison Research.

Alaska

Trump has a wide lead and is broadly expected to carry the state. Still, just 56% of the expected vote has been counted, with Trump ahead by 62.9% to 33%.

Arizona

Biden has a significant lead, and the Associated Press and Fox News have already called the state for the Democrat. With 86% of the expected vote counted, Biden leads with 50.7% against 47.9% for Trump, according to Edison Research.

Arizona Secretary of State Katie Hobbs told ABC News that Maricopa County, which includes heavily populated Phoenix, had about 400,000 outstanding ballots to be counted and would release more results later on Wednesday.

Georgia

Trump is holding onto a narrow lead, but several of the large counties around Atlanta that lean Democratic have substantial numbers of ballots still to count. With 95% of the expected vote counted, Trump is ahead with 49.7% versus 49% for Biden.

Georgia Secretary of State Brad Raffensperger said he hoped to have a result by the end of Wednesday.

Under Georgia law, if the margin between the candidates is less than or equal to 0.5 percentage point, a candidate may request a recount within two business days following the certification of results.

Trump’s campaign filed a lawsuit to require that Chatham County, which includes Savannah, separate and secure late-arriving ballots to ensure they are not counted. The campaign said it had received information that late-arriving ballots in the county were improperly mingled with valid ballots.

Maine

Maine is one of two states that divide their Electoral College votes between the winner of the statewide popular vote and the winner in each of its congressional districts.

Edison Research has allocated Biden two votes for the statewide outcome, which he leads by 53.8% to 43.2% with 87% of the state’s expected votes counted. It also called the state’s 1st Congressional District for Biden, giving him a third electoral vote from the state.

Trump has a lead of 51.4% to 45.1% in the state’s 2nd Congressional District. The Associated Press projected Trump the winner of the state’s fourth vote on Wednesday, with only 53.7% of the expected vote in.

Michigan

Biden has a growing margin, with CNN and NBC projecting Biden the winner there just before 4.30 p.m. EST (2130 GMT) on Wednesday. Biden leads Trump by 50.3% to 48.1% with 99% of the state’s expected votes counted.

Michigan Secretary of State Jocelyn Benson said on Wednesday night that all valid ballots in the state had been counted, and that a lawsuit by Trump seeking to halt counting of votes there was “frivolous.”

Nevada

Long seen as a solid Biden-leaning state, Nevada now appears in play. Edison Research data shows 86% of the expected vote is in and Biden’s lead is just 49.3% to 48.7% for Trump.

State officials expect the remaining votes - largely mail-in ballots - to be counted by 9 a.m. PST (1700 GMT) on Thursday. Clark County, the state’s largest and home to Las Vegas, has tallied 84% of expected votes so far and Biden is ahead there 52.9% versus 45.4% for Trump.

North Carolina

The margin between Trump and Biden is less than 2 percentage points as the president clings to a lead of 50.1% to 48.7% for the Democrat, with 95% of the expected vote counted.

The state allows mail-in ballots postmarked by Tuesday to be counted if they are received by Nov. 12. On Wednesday morning, the Biden campaign said it expected a final result to take several days, and state officials said later on Wednesday that a full result would not be known until next week.

Pennsylvania

Of the battleground states, Pennsylvania has the furthest to go in counting votes, and Trump so far maintains a lead. With 88% of the expected vote counted, Trump is up 50.8% to 47.9% for Biden.

Officials there can accept mailed-in ballots up to three days after the election if they are postmarked by Tuesday. About 1 million votes remain to be counted, Governor Tom Wolf, a Democrat, said on Wednesday.

If the margin of victory is within half of 1%, state law requires a recount.

The Trump campaign said on Wednesday it was suing to temporarily halt vote counting in Pennsylvania and also asked to intervene in a U.S. Supreme Court case over mail-in ballots in the state, which could determine the winner of the election.

Wisconsin

The Trump campaign said on Wednesday it would request a recount of votes in Wisconsin, where the margin between the candidates is less than 1 percentage point.

Biden is up 49.4% to 48.8% for Trump with 99% of the expected vote tallied, according to Edison Research. Edison said that it would not call a race in Wisconsin or any state where the margin is narrow enough to allow a candidate to demand a recount under state law. Some media outlets, including NBC and the Associated Press, projected Biden the winner.

Note: Vote counts supplied by Edison Research, which provides exit polls and voting data to the National Election Pool media consortium. Reuters has not independently tabulated the ballots.