DONALD Trump has launched legal action in a desperate bid to stave off election defeat.

The US president is taking court action over the vote in Michigan, as well as demanding a recount in the battleground state of Wisconsin.

The loss of the two states would spell disaster for the Republican’s attempt to seal a second term, with neither he nor Joe Biden yet reaching the 270 electoral college threshold.

The Democratic campaign announced earlier that it was set to secure victory in the battleground states of Wisconsin, Michigan, Pennsylvania and Nevada – enough to secure the presidency.

READ MORE: US election: Joe Biden set to secure victory in key battleground states

However, Trump’s campaign manager Bill Stepien has announced legal action over ballots being counted in Michigan.

He claims the president’s team “had not been provided with meaningful access to numerous counting locations to observe the opening of ballots and the counting process, as guaranteed by Michigan law”.

Stepien added: “We have filed suit today in the Michigan Court of Claims to halt counting until meaningful access has been granted. We also demand to review those ballots which were opened and counted while we did not have meaningful access.

“President Trump is committed to ensuring that all legal votes are counted in Michigan and everywhere else.”

The Republican campaign chief also said they will “immediately” request a recount in Wisconsin, stating: “The President is well within the threshold to request a recount and we will immediately do so.”

Republican appeals for recounts in Michigan and Wisconsin are likely to rely on the margin between the candidates remaining razor thin, but the latest projections suggest Biden's winning margin will be considerable. 

Trump, who has made false claims about voter fraud, prematurely claimed victories in several key states and said he would take the election to the Supreme Court to stop the counting. It was unclear exactly what legal action he might try to pursue.

Vote tabulations routinely continue beyond election day, and states largely set the rules for when the count has to end.

Several states allow mailed-in votes to be accepted after election day as long as they are postmarked by Tuesday. They include Pennsylvania, where ballots postmarked by November 3 can be accepted if they arrive up to three days after the election.

Trump suggested those ballots should not be counted, but Biden, briefly appearing in front of supporters in Delaware, urged patience, saying the election "ain't over until every vote is counted, every ballot is counted".

"It's not my place or Donald Trump's place to declare who's won this election," he said. "That's the decision of the American people."

Pennsylvania governor Tom Wolf tweeted that his state had more than a million ballots to be counted, and said officials "promised Pennsylvanians that we would count every vote and that's what we're going to do".

Democrats typically outperform Republicans in mail voting, while the Republicans look to make up ground in election day turnout. That means the early margins between the candidates could be influenced by which type of votes – early or election day – being reported by the states.

Throughout the campaign, Trump has cast doubt on the integrity of the election with baseless claims and repeatedly suggested that mail-in ballots should not be counted, providing no supporting evidence. Both campaigns have teams of lawyers at the ready to move into battleground states to contest legal challenges.