A Michigan appeals court ruled Tuesday that Green Party presidential candidate Jill Stein should never have been allowed to demand a recount in the state, setting the stage for continuing legal battles as the recount gets underway.

The Michigan Court of Appeals released a 3-0 opinion declaring the state Board of Canvassers should never have permitted Stein’s recount to proceed, The Associated Press reported.

ADVERTISEMENT

Stein is not an “aggrieved candidate” under state law, it said, having received just over 1 percent of the vote on Election Day.

The recount will proceed for the time being, but the court ordered the state election board to deny Stein's recount petition. The board meets on Wednesday.

And the Michigan Republican Party will file a motion late Tuesday with the judge who ordered the recount to begin Monday to dissolve his recount order, a spokeswoman told the Detroit Free Press.

“We’ll be making that motion and expect that recount will be stopped,” Sarah Anderson said of the recount order.

However, an almost simultaneous ruling from a federal court found in a 2-1 opinion that U.S. District Judge Mark Goldsmith “did not abuse [his] discretion” in ruling the recount should begin Monday instead of Wednesday. However, it did not weigh in on the merits of Stein's case.

“If subsequently, the Michigan courts determine the ... recount is improper under Michigan state law for any reason, we expect the district court to entertain any properly filed motions to dissolve or modify this order in the case,” the 6th Circuit Court said.

“[We] did not decide that there is a freestanding constitutional right to a recount or that plaintiffs validly invoked a recount under Michigan law, or that plaintiffs should necessarily prevail on the merits of this suit.”

The 6th Circuit added it only found Stein and a Michigan voter would have suffered “irreparable harm” if the recount were not started in time to conclude before a Dec. 13 deadline.

A spokeswoman for Attorney General Bill Schuette told the Free Press that there was "no conflict" between the two decisions, but that Schuette would be filing a motion to dissolve the federal court's order.

Stein has filed for recounts in Michigan, Pennsylvania and Wisconsin following President-elect Donald Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE’s surprising victories there last month.

Trump narrowly defeated Democratic presidential nominee Hillary Clinton Hillary Diane Rodham ClintonButtigieg stands in as Pence for Harris's debate practice Senate GOP sees early Supreme Court vote as political booster shot Poll: 51 percent of voters want to abolish the electoral college MORE in all three states, which have typically gone blue in past election cycles.