US presidential election recount efforts have come to an end in Pennsylvania and Wisconsin, with both states certifying Donald Trump as the winner in contests that helped put him over the top in the Electoral College stakes.
Mr Trump's victory in Wisconsin was reaffirmed following a state-wide recount that showed him defeating Democrat Hillary Clinton by nearly 23,000 votes.
Meanwhile, a federal judge issued a stinging rejection of a Green Party-backed request to recount paper ballots in Pennsylvania's presidential election and scan some counties' election systems for signs of hacking.
Green Party candidate Jill Stein successfully requested and paid for the Wisconsin recount, but her attempts for similar state-wide recounts in Pennsylvania and Michigan were blocked by the courts.
Ms Stein garnered only about 1% of the vote in each of the three states, which Mr Trump narrowly won over Mrs Clinton. Ms Stein argued, without evidence, that voting machines in all three states were susceptible to hacking.
All three states were crucial to Mr Trump's victory, having last voted for a Republican for president in the 1980s.
The numbers barely budged in Wisconsin after nearly three million votes were recounted.
Billionaire New York property mogul Mr Trump picked up 131 votes and won by 22,748 votes. The final results changed just 0.06%.
Mr Trump took to Twitter to celebrate the recount result.
The final Wisconsin vote is in and guess what - we just picked up an additional 131 votes. The Dems and Green Party can now rest. Scam!— Donald J. Trump (@realDonaldTrump) December 12, 2016
Ms Stein said she was disappointed not all Wisconsin counties performed hand recounts, although most did. She said the goal of the recount was never to change the outcome but to validate the vote and restore confidence in the system.
"The recount in Wisconsin raised a number of important election integrity issues that bear further assessment and serious action to ensure we have integrity and confidence in our electoral system," she said, without naming what they were.
Wisconsin Elections Commission chairman Mark Thomsen said before certifying the recount results there was no evidence of a hack.
In Pennsylvania, state officials certified the results of the election in the hours following the decision by US district judge Paul Diamond.
Mr Trump beat Mrs Clinton in the state by about 44,000 votes out of six million cast, or less than 1%, according to the final tally after weeks of counting provisional and overseas ballots. Green Party voters had petitioned some counties to do partial recounts, affecting few votes, county officials said.
Judge Diamond said there were at least six grounds that required him to reject the Green Party's lawsuit, which had been opposed by Mr Trump, the Pennsylvania Republican Party and the Pennsylvania attorney general's office.
Suspicion of a hacked Pennsylvania election "borders on the irrational" while granting the Green Party's recount bid could "ensure that no Pennsylvania vote counts" given Tuesday's federal deadline to certify the vote for the Electoral College, the judge, an appointee of Republican former president George Bush, wrote.
"Most importantly, there is no credible evidence that any 'hack' occurred, and compelling evidence that Pennsylvania's voting system was not in any way compromised."
He said the lawsuit suffered from a lack of standing, potentially the lack of federal jurisdiction and an "unexplained, highly prejudicial" wait before filing last week's lawsuit, four weeks after the November 8 election.
The decision was the Green Party's latest roadblock in Pennsylvania after hitting numerous walls in county and state courts. Green Party-backed lawyers argue it was possible that computer hackers changed the election outcome and that Pennsylvania's heavy use of paperless machines made it a prime target.
Ms Stein also contended Pennsylvania erected unconstitutional barriers to voters seeking a recount.
A lawyer for the Green Party members said they were disappointed and unable to immediately say whether they would appeal.
"But one thing is clear," said lawyer Ilann Maazel. "The Pennsylvania election system is not fair to voters and voters don't know if their votes counted, and that's a very large problem."
A federal judge halted Michigan's recount last week after three days. Mr Trump won Michigan by fewer than 11,000 votes out of nearly 4.8 million votes cast.