As President Trump's legal team argued before the Wisconsin Supreme Court Saturday to have hundreds of thousands of ballots in two blue counties tossed, the president’s reelection effort had another legal loss in federal district court.

U.S. District Judge Brett Ludwig, who President Trump appointed to the bench, dismissed a federal lawsuit that would have forced the state Legislature to declare Trump the winner of the state’s Electoral College votes over President-elect Joe Biden.

The president’s legal arguments “fail as a matter of law and fact,” Ludwig said.

President Donald Trump walks on the South Lawn of the White House in Washington, Dec. 12, before boarding Marine One. Trump went to the Army-Navy Game at the U.S. Military Academy in West Point, N.Y. (AP Photo/Patrick Semansky)

President Donald Trump walks on the South Lawn of the White House in Washington, Dec. 12, before boarding Marine One. Trump went to the Army-Navy Game at the U.S. Military Academy in West Point, N.Y. (AP Photo/Patrick Semansky)

WISCONSIN SUPREME COURT TAKES UP TRUMP CASE AFTER CIRCUIT COURT JUDGE DISMISSED

Still, Trump renewed his allegations of widespread voter fraud on Twitter Saturday. Courts have seldom sided with his legal team’s arguments as he seeks to invalidate Biden’s victory.

“I WON THE ELECTION IN A LANDSLIDE, but remember, I only think in terms of legal votes, not all of the fake voters and fraud that miraculously floated in from everywhere,” the president claimed. “What a disgrace!”

The other case, which aims to discount ballots in the heavily Democratic Milwaukee and Dane counties, was dismissed by a lower court but later picked up by the state’s Supreme Court. It doesn’t challenge votes in counties the president won.

SUPREME COURT DECLINES TO HEAR TRUMP-SUPPORTED TEXAS CASE OVER ELECTION RESULTS IN FOUR OTHER STATES

Liberal Wisconsin Supreme Court Justice Jill Karofsky told Trump attorney Jim Troupis during arguments Saturday that the lawsuit “smacks of racism.”

“I do not know how you can come before this court and possibly ask for a remedy that is unheard of in U.S. history,” she said. “It is not normal.”

The state’s highest court is controlled by a 4-3 conservative majority.

Wisconsin certified its results on Nov. 30, declaring Biden the winner by more than 20,000 votes.

Wisconsin has 10 Electoral College votes, and the electors are scheduled to meet Monday and formally vote.

On Friday, the U.S. Supreme Court declined to hear a Texas and Trump-backed lawsuit seeking to have the election results in four states that swung for Biden overturned.

CLICK HERE TO GET THE FOX NEWS APP

Trump called that decision “a great and disgraceful miscarriage of justice.”

Fox News’ Caitlin McFall and the Associated Press contributed to this report.