The US Supreme Court has rejected an unprecedented attempt to throw out election results in four battleground states that was backed by President Donald Trump.
The lawsuit, filed this week by the state of Texas, sought to invalidate results in Georgia, Michigan, Pennsylvania and Wisconsin.
President-elect Joe Biden won all four.
The lawsuit was supported by 18 state attorneys general and 106 Republican members of Congress.
But in a brief order rejecting the bid, the Supreme Court ruled on Friday that Texas did not have legal standing to bring the case.
The ruling represents a setback for Mr Trump, who has previously suggested without evidence that the result of November's presidential election would be settled in the Supreme Court.
The court rejected a separate legal challenge against Mr Biden's victory in Pennsylvania earlier this week, dismissing it in a one-sentence ruling.
Mr Trump has made repeated unsubstantiated assertions that "illegal votes" cost him a second presidential term.
Since the election, Mr Trump and his supporters have launched dozens of lawsuits questioning the results of the election. None have come close to overturning Mr Biden's victory.
The Democratic candidate defeated Mr Trump by a margin of 306 to 232 votes in the US electoral college, which chooses the US president. Mr Biden won seven million more votes than the president nationwide.
The electoral college is expected to meet on Monday to formally elect Mr Biden as the 46th president of the US.
A legal challenge for the history books
The Supreme Court, as expected by most legal experts, wanted nothing to do with Texas's challenge to the results of the 2020 presidential election.
The ruling was slightly longer than the one-sentence "motion denied" response in a Pennsylvania case earlier this week. Two of the nine Supreme Court justices, Samuel Alito and Clarence Thomas, said they wouldn't have dismissed the lawsuit outright. But even they would not express a view on whether Texas's attempt to throw out millions of votes and effectively hand the presidency to Mr Trump had merit.
The decision paves the way for the members of the electoral college to meet in state capitals across the US on Monday. At that point, the door to Mr Trump's legal challenges to the election will slam closed. And while his supporters may try a last-ditch effort to block Mr Biden's victory in Congress in January, those political manoeuvres are destined to fail. Democrats will make sure of that.
The implications of this challenge, however, are unlikely to quickly fade away. Eighteen states and more than 100 Republicans in Congress endorsed discarding the results of the election and putting the White House in the hands of state legislatures.
That is something Democrats - and the history books - won't soon forget.
What was the Texas legal challenge about?
The lawsuit was filed on Tuesday by the Republican Attorney-General of Texas, Ken Paxton - an ally of Mr Trump. It was supported by the president, who on Wednesday filed a motion to intervene and become a plaintiff in the case.
The lawsuit sought to discard the presidential election results in Wisconsin, Michigan, Pennsylvania and Georgia, four crucial states won by Mr Biden.
Texas alleged that the results in those states were unlawful because of changes to voting procedures to help Americans cast their ballots during the coronavirus pandemic.
Mr Paxton's lawsuit asked the Supreme Court to allow the legislatures of those states - which are all controlled by Republicans - to determine who should get their electoral college votes.
But on Thursday, the four states in a filing asked the justices to reject the lawsuit, which they said had no legal grounds. The Supreme Court agreed.
"Texas has not demonstrated a judicially cognisable interest in the manner in which another state conducts its elections," the court said in its ruling.
Before the ruling, legal experts were sceptical of the lawsuit's chances of success. But just hours before the ruling, Mr Trump appeared optimistic, urging the Supreme Court to show "great Wisdom and Courage".
The court failed to do so, Mr Trump later wrote in a tweet bemoaning the verdict.
Allow Twitter content?
What reaction has there been to the ruling?
"There's no way to say it other than they dodged," said White House spokeswoman Kayleigh McEnany, referring to the judges. "They dodged, they hid behind procedure, and they refused to use their authority to enforce the constitution."
A spokesman for Mr Biden said it was "no surprise" the Supreme Court rejected "baseless attempts" to deny Mr Trump lost the election.
"Our nation's highest court saw through this seditious abuse of our electoral process," Pennsylvania Attorney General Josh Shapiro, a Democrat, said on Twitter.
Dana Nessel, Michigan's Democratic attorney general, said the ruling was "an important reminder that we are a nation of laws, and though some may bend to the desire of a single individual, the courts will not".
The tone was gloomier among Republicans.
The chairman of the Republican Party in Texas, Allen West, said the court's decision would have "far-reaching ramifications for the future of our constitutional republic".
"Perhaps law-abiding states should bond together and form a Union of states that will abide by the constitution," he said in a statement.