DETROIT – The Michigan Court of Appeals rejected Green Party candidate Jill Stein's request for a recount of presidential ballots in Michigan.

The court ruled that the Board of State Canvassers should not have allowed the recount, because Stein win the presidential election due to the recount.

"Accordingly, we grant the requests of the Attorney General and President-Elect Trump for issuance of a writ of mandamus," a court official said in a statement. "We direct the Board of State Canvassers to reject the Nov. 30, 2016 petition of candidate Stein that precipitated the current recount process. We retain jurisdiction."

READ: Federal court upholds judge's decision to continue Michigan recount

Republicans had filed an appeal to overturn a federal judge's ruling to proceed with the recount, which began at noon Monday. Green Party candidate Jill Stein requested a recount of Michigan's presidential ballots last month.

"I’m grateful, and I know Michigan taxpayers agree, that the Michigan Court of Appeals has adhered to the rule of law, and clarity in our Michigan statute in agreeing that Jill Stein is not an aggrieved candidate and the recall must stop," Michigan Attorney General Bill Schutte said in a statement.

The U.S. 6th Circuit Court of Appeals upheld the federal judge's order to continue the hand recount, but the Michigan Court of Appeals rejected the recount process.

"This is a win for Michigan taxpayers," Michigan Republican Party chairman Ronna Romney McDaniel said in a statment. "The Michigan Court of Appeals ruled in our favor, determining that the petition for recount filed by Dr. Jill Stein should have been denied. Dr. Stein is not an aggrieved candidate as she has no chance of winning the election in Michigan."

The U.S. 6th Circuit Court of Appeals made clear, in their ruling, that “If, subsequently, the Michigan courts determine that Plaintiffs’ 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 its order in this case."

Opponents of the recount claim that it's too expensive and that Stein, who received just 1 percent of the vote, is wasting resources.

Meanwhile, ballots are being recounted in Oakland, Macomb and Wayne counties. As long as the recount continues, county clerks are scrambling to get the job done by Dec. 13.

VIEW: Michigan recount schedule by county

The legal arguments are being heard in both state and federal courts, and the attorney general said the battle could theoretically end up in front of the U.S. Supreme Court.

"I'm just saying, theoretically, it could go there," Schuette said. "I'm just taking it just one step at a time, and I'm convinced, and I have confidence in the Michigan court system, and the Michigan judicial system, to uphold the Michigan statute, and the Michigan law will prevail."

Schuette said the battle is a matter for the state courts because he said there is no U.S. constitutional right to a recount.

You can catch up on what has led to this hearing below.

Stein files for recount in Michigan

Green Party candidate Jill Stein’s campaign officially filed a recount request on Nov. 30.

Green Party officials filed for a recount in Wisconsin after some limited reports of possible voting discrepancies in areas that used paper ballots vs. those where electronic voting took place. Stein has raised more than $5 million online for the recount in the state, which state officials estimate will cost about $3.5 million.

Stein's campaign handed the Michigan secretary of state a check for $973,250 on Wednesday. The campaign said it intends to pay all fees associated with the recount in Michigan, and is currently recruiting volunteers to observe the hand recounts that are likely to take place in 19 sites, representing all 83 counties across the state.

"The people of Michigan and all Americans deserve a voting system we can trust," Stein said. "After a presidential election tarnished by the use of outdated and unreliable machines and accusations of irregularities, people of all political persuasions are asking if our election results are reliable. We must recount the votes so we can build trust in our election system. We need to verify the vote in this and every election so that Americans can be sure we have a fair, secure and accurate voting system."

Stein's campaign said "computer scientists and election experts have raised serious concerns about election results, including the vulnerability of voting machines that can be breached without detection and have a tendency to misread markings made by voters."

RECOUNT STATES: Michigan's expands, Pennsylvania awaits federal ruling

"In the recent Michigan election, for example, there were 75,335 under-count tallies -- votes that machines did not record as selecting anyone for president -- nearly double the amount recorded in 2012," Stein's campaign said.

Meanwhile, Michigan Republicans said the request for a hand recount of presidential votes could cost taxpayers up to $12 million, a dozen times more than Stein will have to pay.

"The filing by Jill Stein is a reckless attempt to undermine the will of Michigan voters. Jill Stein made her 1 percent temper tantrum official and will waste millions of Michigan taxpayers’ dollars, and has acknowledged that the recount will not change anything regarding the presidential election,” said Michigan Republican Party chairman Ronna Romney McDaniel.

Trump sues to block Michigan recount

Trump filed a lawsuit Dec. 2 in the Michigan Court of Appeals in an effort to stop a recount in the state.

Trump sued the Michigan Board of Canvassers, claiming that Stein does not have the standing to seek a recount of 4.6 million ballots.

The lawsuit said Stein has little chance of benefiting from a shift in votes. The recount, meanwhile, is set to start next week. The Court of Appeals has given the Board of Canvassers until Tuesday to respond to Trump's suit.

Michigan's elections board considered Trump's request and was deadlocked, which blocked the objection.

The elections board was split along party lines.

Lawyers for the Trump campaign argued Thursday that Stein, a "bottom-dwelling candidate," cannot seek the expensive, time-consuming recount because she was not "aggrieved" to the point where potential miscounting of votes could have cost her the election. She garnered just 1 percent in Michigan.

They also said in their objection that Stein waited until the last minute to file her recount petition on Wednesday, making it impossible to finish by a Dec. 13 deadline.

Stein files federal lawsuit to try to force Michigan recount

Stein filed a federal lawsuit Dec. 2 to try to force Michigan to conduct a recount.

Stein sued election officials, demanding that the recount proceed, so two different courts stood with the issue before them.

The Trump team and the Michigan attorney general asked the Michigan Supreme Court to hear their cases.

Stein went to federal court in Detroit, hoping to have her case heard.

Michigan election officials ordered to start recount

A U.S. District judge approved Stein's request for a temporary restraining order to accelerate the recount of presidential votes in Michigan.

The announcement was made overnight Sunday after a 10:30 a.m. hearing at the federal court building in Detroit. The recount began at noon Monday. The deadline to have it finished is Dec. 13.

The secretary of state's office said Ingham and Oakland counties were to begin the recount at noon Monday.

Republicans file appeal of federal court decision

Republicans electronically filed an appeal Monday of a federal court ruling to move forward with Stein's request for a recount.

"This is a Michigan issue, and should be handled by the Michigan court system,” said Michigan Republican Party chairman Ronna Romney McDaniel. "Michigan courts should decide Michigan election law."

The GOP filed the appeal in the 6th Circuit Court in Cincinnati, claiming that the government has no right to interrupt the case on a state level. The appeal focuses on arguments for abstention of the federal court, as well as laches, arguing that Stein waited until the last possible moment to file a petition for recount, and thus cannot ask the court to enjoin.

"Jill Stein’s lack of planning should not constitute emergency action of Michigan taxpayers and clerks," McDaniel said. "This recount is a waste of time, energy and Michigan taxpayer dollars and should be stopped immediately. We hope that when the Michigan Court of Appeals hears our case tomorrow, they will stop this unnecessary recount."

The Michigan Court of Appeals scheduled oral arguments for 4 p.m. Tuesday.

Schuette: State law needs to prevail

Schuette announced Tuesday morning his office has joined a federal lawsuit to stop the recount in Michigan to make sure the state's law prevails.

Schuette reiterated Stein cannot be considered an "aggrieved party" in this election due to her relatively low vote total. His lawsuit to block the recount said the Michigan statute authorizing recounts requires the petitioning candidate -- Stein -- to demonstrate that she was “aggrieved” by fraud or mistake.

"Michigan law needs to prevail here," Schuette said. "This federal takeover is absolutely wrong, and it's unjust. Michigan is very clear and we have a very transparent statute. I understand recounts, I've been through one. In Michigan you have to be an injured party, an aggrieved party. Jill Stein received 1 percent of the 4.8 million votes that were cast on Nov. 8. She waited 3 and a half weeks to even file an objection."

Schuette said in order for Stein to be considered an "aggrieved party" under the law she would have had to have lost by far less votes.

"If Jill Stein had lost by 20 votes, or 200 votes, or 2,000 votes, then that would be an example of an aggrieved or injured party," he said. "But Jill Stein, in the recount, would have to find 2 million votes, which is preposterous. It's never gonna happen."

Stein's party admitted they are not expecting to overturn the election results with a recount.

VIEW: All ClickOnDetroit.com recount headlines