Wisconsin will begin a historic presidential recount next week and the state could risk losing its ability to have its 10 electoral votes counted if it doesn’t meet key deadlines next month.

Hitting a Dec. 13 deadline could be particularly tricky if Green Party presidential nominee Jill Stein is able to force the recount to be conducted by hand, Wisconsin’s top election official said.

Stein and independent presidential candidate Roque “Rocky” De La Fuente separately filed recount requests late Friday, the last day they were able to do so. Stein received about 30,000 votes and De La Fuente about 1,500 out of 3 million cast.

One or both of them will have to pay for the recount because they lost by more than 0.25 percent. The cost could top $1 million.

Stein is also planning to ask for recounts in Michigan and Pennsylvania, which have deadlines next week. She has raised $5 million for the recounts in recent days.

Wisconsin’s recount will likely begin late next week, once the state has tallied a cost estimate and received payment from Stein’s campaign, said Michael Haas, ­administrator of the Wisconsin Elections Commission. Recounts will be done by county boards of canvassers, which will likely have to work nights and weekends.

The push for a recount came as liberals raised fears about hacked voting machines. Election officials said that they are unaware of any problems with Wisconsin’s vote tally.

Republican Donald Trump edged out Democrat Hillary Clinton by some 27,000 votes in Wisconsin, becoming the first GOP presidential candidate to win the state since 1984.

Wisconsin’s last statewide recount was in 2011 for a state Supreme Court seat. The outcome did not change.

That recount took more than a month. This one would have to be quicker because of a federal law that says states must complete presidential recounts within 35 days of the election to ensure that their electoral votes are counted. This year, that’s Dec. 13.

“You may potentially have the state electoral votes at stake if it doesn’t get done by then,” Haas said.

A lawyer with Stein’s campaign has said that it wants the recount done by hand. That would take longer and require a judge’s order, Haas said.

Perhaps the most important deadline is Dec. 19, when electors around the country must meet to cast their Electoral College votes, said Edward Foley, an expert in election law at Moritz College of Law at Ohio State University. “If a state were to miss that deadline, it would be technically in jeopardy of not having its electoral votes counted,” he said.