President Donald Trump has accused Democrats without evidence of trying to "rig" Tuesday's US election as the result hangs in the balance.
His Democratic challenger Joe Biden earlier appealed for calm as the nail-biting count drags on in five states.
While clinging to his edge in Nevada and Arizona, Mr Biden has been chewing into the Republican president's lead in Pennsylvania and Georgia.
It follows one of the most rancorous presidential races in living memory.
In his first public remarks since appearing at the White House in the early hours of Wednesday, the president said: "If you count the legal votes, I easily win.
"If you count the illegal votes they can try to steal the election from us."
Beyond allegations of irregularities, the Trump campaign has not presented any evidence of election fraud.
Speaking from the White House on Thursday, the president added: "We were winning in all the key locations, by a lot actually, and then our numbers started getting miraculously whittled away in secret and they wouldn't allow legally permissible observers."
Mr Trump's critics have pointed out his lead is being cut into because he actively discouraged his supporters to vote by mail, while Mr Biden urged his voters to use postal ballots, and it is these votes that are now being tallied in the key states.
The president added: "There's been a lot of shenanigans and we can't stand for that in our country."
What's the reaction?
Mr Trump's remarks were criticised by a couple of fellow Republicans who have in the past been rare voices of dissent against the president within his party.
Outgoing Michigan congressman Paul Mitchell, who decided not to run for re-election this year, said: "Our nation demands that its political leaders accept both wins and losses with grace and maturity. Let the voters decide."
Illinois congressman Adam Kinzinger said: "If you have legit concerns about fraud present evidence and take it to court. Stop spreading debunked misinformation... This is getting insane."
Maryland Governor Larry Hogan - who has previously spoken out against Mr Trump - was more forthright in his criticism.
"There is no defence for the President's comments tonight," he tweeted, "undermining our Democratic process. America is counting the votes, and we must respect the results as we always have before."
Earlier on Thursday, speaking from his campaign headquarters in Wilmington, Delaware, Mr Biden appealed for calm across the country.
In a brief televised address, the Democratic challenger again expressed confidence he would be declared the winner.
"Democracy is sometimes messy," he said. "It sometimes requires a little patience as well.
"But that patience has been rewarded now for more than 240 years, the system of governance that has been the envy of the world."
He added: "I asked everyone to stay calm. All people to stay calm. The process is working. The count is being completed. And we'll know very soon."
As results gradually trickle in, protests involving both sides have been held in major cities over the vote counting.
What's the current state of the race?
Tuesday's presidential election has a cliffhanger ending in the states of Wisconsin, Pennsylvania, Nevada, Arizona, Georgia, Michigan and North Carolina.
Mr Biden has since been declared the winner of Michigan and likely Wisconsin, while nail-biting vote counts involving razor-thin margins have kept America on edge in the other five states.
Mr Biden now has 253 electoral college votes, giving him a commanding lead in the race to accumulate the 270 needed to win the White House under the state-by-state US election system. Mr Trump has 214.
A win in just Pennsylvania or two of the other four remaining states would be enough to confirm as Mr Biden president-elect, barring any longshot legal challenge.
Mr Trump, meanwhile, needs to win Pennsylvania and three of the remaining four states: Georgia, North Carolina, Arizona and Nevada.
A senior Trump administration official told the BBC's US partner CBS News that Mr Trump did not plan to concede if Mr Biden ultimately declared victory.
The unnamed official vowed the legal fight would go on, adding: "In a free and fair election the president will win."
Mr Trump's team has raised millions of dollars for a legal battle.
Former White House chief of staff Mick Mulvaney, meanwhile, predicted in a webinar hosted by a think tank earlier on Thursday that Mr Trump would "absolutely" run for president again in four years' time if he lost to Mr Biden.
The president complains of “tremendous corruption and fraud in the mail-in ballots", without giving any evidence for his claim Legal mail-in ballots are still being counted in four states whose results will decide the election: Arizona, Georgia, Nevada and Pennsylvania
The president says he is "on track to do OK in Arizona", although the latest tally, with 88% of votes counted, shows Biden ahead.
President Trump says that "ultimately I feel that judges will have to rule" on the result.
Joe Biden says people should remain calm as votes are counted, adding he has "no doubt" he will emerge the winner.
The Democrat has a slender lead in Nevada and Arizona and is chipping away at Trump's advantage in Georgia and Pennsylvania /Biden has racked up a record 71.5 million votes and has said he will win enough states to become president
Overall turnout is projected to be the highest in 120 years at 66.9%, and we might not have a result for days President Donald Trump staged a corrosive and potentially dangerous attempt at undermining the US election on Thursday, baselessly claiming the presidency was being stolen from underneath him as vote counts showed his path to victory disappearing.
Standing at the White House podium, the President repeated false claims that a count of legally cast ballots would show him winning against former Vice President Joe Biden. He complained that in certain states where he had been leading on election night, tallies have been "whittled down" or have shown his rival leading.
Using the briefing room to espouse baseless claims he is being deprived a second term by fraud, Trump thrust into question the democratic notion of a peaceful transition of power should Biden win. Instead he suggested he would fight in the courts until the election is decided in his favor.
"This is a case where they're trying to steal an election, they're trying to rig an election, and we can't let that happen," Trump said in a dour monotone, providing no evidence and departing the room without answering for his false claims.
The spectacle, though foreshadowed by the President for months, was nevertheless a sign of Trump's unwillingness to cede the White House without a prolonged battle. Even as he complained that his own race had been rigged, Trump used the occasion to trumpet down-ballot wins by Republicans without explaining why those races wouldn't be similarly afflicted by his claims of fraud.
His message came as new tallies show his lead dwindling in Georgia and Pennsylvania, where mail-in ballots are still being counted.
Trump spent the past six months decrying the use of mail-in ballots, a strategy even some Republicans feared would suppress his own totals. While Trump retains a pathway to 270 electoral votes, it has grown smaller by the hour.
The President had not been seen in public since his middle-of-the-night speech on Wednesday, when he falsely declared victory. Aides said Biden's public appearances on Wednesday and Thursday -- during which he called for patience and calm as the votes are counted -- prompted Trump to push harder to do the same, though some had hoped to avoid the type of speech the President ultimately delivered.
Despite campaign assurances that the numbers will eventually break their way -- and despite the President's apparent desire for a battle -- reality was setting in for several of Trump's aides in the White House and campaign.
Senior advisers privately acknowledged the math simply wasn't on their side and were preparing for a loss. Others privately acknowledged the chances of Trump winning are now slim and were contemplating their next career steps.
But that reality hasn't appeared to have set in for the candidate himself. Before his briefing room appearance, Trump continued to make a series of phone calls overnight, stung that his lead in some states had vanished and convinced Biden is stealing the presidency.
Entrenched at the White House with no public events on his schedule, Trump has personally dispatched advisers to battlegrounds across the country hoping to wage legal fights in places where the margins remain tight.
That has included his two adult sons, who voiced frustration on Thursday that more Republicans weren't publicly backing the President in his battle to halt vote counting.
"Where is the GOP?! Our voters will never forget..." wrote Eric Trump. His older brother, Donald Trump Jr., accused "2024 GOP hopefuls" of remaining silent in the effort.
After Trump's appearance at the White House, it was unclear whether Republicans would remain at his side.
"There is no defense for the President's comments tonight undermining our Democratic process," tweeted Maryland's Republican Gov. Larry Hogan, who has sometimes been critical of Trump. "America is counting the votes, and we must respect the results as we always have before. No election or person is more important than our Democracy."
But others remained steadfast, including Vice President Mike Pence, who had not been heard from since Trump falsely claimed victory on election night."I Stand With President @realDonaldTrump," Pence tweeted. "We must count every LEGAL vote."
Despite his own private skepticism about the efficacy of his legal strategy, Trump has remained intent on waging a prolonged fight, viewing it as his only option. It was an onslaught the President previewed ahead of time, vowing to unleash his team of lawyers in states where he was losing.
But it was nonetheless a scattershot effort that seemed designed more to undermine confidence in the election results and provide legal backing to Trump's unfounded claims of fraud than to actually surface more votes.