WASHINGTON — Nearly three weeks after Election Day, Michigan officials certified Monday that Donald Trump won the state by 10,704 votes out of nearly 4.8 million to claim all of its 16 electoral votes. There’s more wrangling to come, though, on the final vote count for this oh-so-contentious campaign.

Jill Stein’s Green Party served notice that it would petition for a Michigan recount even as her party pushed forward with recount efforts in Wisconsin and Pennsylvania, where Trump won by somewhat wider but still small margins.

Should the results for Trump hold in all three states, as expected, the president-elect would have 306 electoral votes to 232 for Democrat Hillary Clinton. It takes 270 to be elected president.

Only if the results were overturned in all three states would Clinton have a claim on the presidency, and that is widely considered to be out of the question.

If it’s any consolation for Clinton — and it’s probably mighty little — she’s winning the national popular vote. With some votes still being counted, she is ahead by more than 2 million, about 1.5 percent of the total counted so far.

Trump, in a series of weekend tweets complaining about the Midwest recount efforts, said the Green Party was engaged in a “scam to fill up their coffers” and that “defeated & demoralized Dems” were joining in.

Stirring the post-election pot, Trump made his own unsubstantiated claim of widespread voter fraud in Virginia, New Hampshire and California, saying without evidence that he would have won the popular vote if millions of people had not voted illegally.

Stein, who won 1.4 million votes nationwide or about 1 percent of the count, signaled her determination to keep pushing the Midwest recount efforts, saying that “Americans deserve a voting system we can trust.” As of Monday, she had raised $6.2 million to finance recounts, according to her campaign website.

“After a presidential election tarnished by the use of outdated and unreliable machines and accusations of irregularities and hacks, people of all political persuasions are asking if our election results are reliable,” she said in a statement.

There is no evidence that voter results were hacked or that electronic voting machines were compromised.

The Clinton campaign, which declined to initiate recounts on its own, said over the weekend it would participate in the recounts requested by Stein “to ensure the process proceeds in a manner that is fair to all sides,” in the words of campaign lawyer Marc Elias.

Stein’s campaign said she would file a petition Wednesday for a Michigan recount, after which Trump would have seven days to file objections. Trump’s margin of victory in the state was a slim 0.22 percent of the total vote.

Michigan Republican Party Chairwoman Ronna Romney McDaniel said a recount would be “a waste of time and disrespectful to all Michigan voters.”

Chris Thomas, director of the Michigan Bureau of Elections, said the recount would begin as early as Friday to meet a Dec. 13 deadline. Under state policy, the recount will be conducted by hand.

He said election officials have heard a lot this year about “so-called fraud … without any foundation in fact,” and a recount settling that question could provide one “silver lining.”

In Wisconsin, meanwhile, the state elections commission on Monday approved a timeline to start a recount on Thursday. Stein is pushing for a hand count of the nearly 3 million ballots cast in the state, but the commission left it up to local election officials to determine the best method.

Stein’s Wisconsin recount request included an affidavit from University of Michigan computer scientist J. Alex Halderman stating that a hand recount is the only way to determine whether there could have been a cyberattack that affected the results. He argued that records stored in electronic voting equipment could have been manipulated in an attack.

The AP on Monday updated its election night vote count in Wisconsin to correct the totals for both candidates in three separate counties. The updates dropped Trump’s margin over Clinton from 27,257 votes to 22,460 votes, or 0.8 percent of the total vote. The corrections were made during the regular post-election canvass of the election-night vote.

In Pennsylvania, where Trump edged Clinton by about 71,000 votes, or about 1 percent of the vote, Stein filed a lawsuit seeking a statewide recount but it wasn’t clear if the courts had the authority to order one.

Democratic Secretary of State Pedro Cortes said there was no evidence of voting irregularities or cyberattacks on Pennsylvania’s voting machines, 96 percent of which record votes electronically and leave no paper trail.

___

AP Writers Julie Bykowicz in Washington, David Eggert in Lansing, Michigan, Scott Bauer in Madison, Wisconsin, and Mark Levy in Harrisburg, Pennsylvania, contributed to this report.t.