Recount results: Trump won Pennsylvania by 44,000 votes, Wisconsin by just 22,748; Trump calls recounts 'scam!'

MADISON, Wis. (AP) — Pennsylvania has certified Republican Donald Trump as the winner in the state's presidential election after weeks of counties tallying up provisional and overseas ballots.

The result certified Monday shows Trump beating Democrat Hillary Clinton in the state by about 44,000 votes out of 6 million cast, or less than 1 percent. Trump's lead shrank over the last five weeks, from about 71,000 on election night.

Trump won just over 2.97 million votes. Clinton won a little under 2.93 million votes. It was the closest percentage victory in a presidential race in Pennsylvania since 1840.

Libertarian Party candidate Gary Johnson took home almost 147,000 votes. Green Party candidate Jill Stein drew a shade below 50,000. Constitution Party candidate Darrell Castle drew under 22,000.

Meanwhile, Trump's victory in Wisconsin widened by just 131 votes following a statewide recount of nearly 3 million votes.

Wisconsin on Monday certified results of the recount requested and paid for by Stein. Earlier it said Trump had picked up 162 more votes.

Trump tweeted afterward:

Trump defeated Clinton by 22,748 votes. Stein was way behind them.

Stein requested the recount in Wisconsin and tried unsuccessfully for recounts in Michigan and Pennsylvania, alleging without evidence that voting machines could have been hacked. Recounts there were halted by the courts.

Wisconsin Elections Commission Chairman Mark Thomsen says the recount revealed no evidence of any hacking.

Stein says she's disappointed not all Wisconsin counties did a hand recount, although most did. Stein says the goal of the recount was never to change the outcome but to validate the vote and restore confidence in the voting system.