Broken equipment, missing boxes of ballots, mismatching numbers, confused election officials and Donald Trump’s legal team - such has been the nightmare encountered by Jill Stein in her quest to recount the vote in Michigan.

But now it might all be over, just three days after it started.

US district judge Mark Goldsmith has lifted a temporary restraining order that prevented state officials from stopping Ms Stein’s recount. The judge said that because she received less than 1 per cent of the vote, she could not prove she was an “aggrieved” candidate and request a recount.

In response, Ms Stein has called Michigan’s voting system “screwed up” and “insecure".

She said that 87 ballot machines broke down on election day, and there were more than 30,000 “blank votes” in the state, particularly in Flint and surrounding counties.

And every vote matters, in a state where Mr Trump won by only 10,704 votes.

But now that Mr Trump won the state, and the election, his apparent desire to fight against a “rigged” system has vanished. In a dramatic turnaround, his legal team are determined to block the Green Party at every turn.

Mr Trump appears to be "very afraid", Ms Stein said.

"Michigan is kind of a poster child of how very difficult this process of a recount is," she said in a video on her Facebook page. "But the recount itself is a symptom of how problematic our voting system is, of how screwed up and insecure and unjust our system is.."

Whole boxes of ballots are being discovered after the election - confirmed by Michigan election officials - and they are not being recounted. They were discovered late, therefore were not “sealed” and have to be discarded. These boxes tend to be found in the poorest precincts, creating what Ms Stein described as a "Jim Crow dimension" whereby people of colour are being blocked from their right to vote.

Up to half of the Michigan votes will not be recounted, in fact, due to - ironically - initial counting errors. That means that if a box of ballots was miscounted in the first place, it cannot be recounted.

Nearly 160,000 people have donated an average of $45 for Ms Stein’s movement to recount the vote in three states: Michigan, Pennsylvania and Wisconsin.

Donald Trump announces abrupt change to US foreign policy

Mr Trump called the movement a “scam”, designed to “fill the coffers” of Ms Stein. She replied that every cent was in a dedicated, segregated account.

While Mr Trump himself has stayed relatively silent on the matter, legal challenges from his team abound.

Michigan’s state attorney general and Trump ally, Bill Schuette, stepped in to prevent Ms Stein’s request from being granted by a federal judge, demanding that Ms Stein cannot ask for a recount as she only received just over 1 per cent of the vote. A state judge ruled in his favour.

“Michigan law prevails,” Mr Schuette told The Detroit News. ”You can't make up - like the federal judge is attempting to do - a constitutional right to a recount.”

At voting booths scattered around Michigan, Donald Trump’s team has made themselves present, handing out green stickers to the Jill Stein volunteers so they are clearly identified. There is not a green sticker at every counting table.

“It does seem the Trump folks are trying to deem boxes as non-recountable,” said Lou Novak, a Green Party member in Michigan in a video on the party’s Facebook page. He is new to the process and has had to quickly learn up on the jargon-filled system.

Mr Novak said Trump officials were blocking the Green Party volunteers and staff from recounting whole boxes of ballots by citing "obscure" excuses.

Mr Novak explained that the votes were counted on election day, and the numbers were certified by the Bureau of Elections. The ballots were then put into sealed boxes and stored. When it came to the recount, sometimes the numbers written in the book did not match the numbers on the sealed boxes. That box, which could contain hundreds of ballots, would be discarded. Sometimes the seal on the box might be broken. Again, the entire box would not be recounted.

The deadline for the recount of 13 December is fast approaching for Michigan.

But Ms Stein said she, Mr Novak and her entire team would push forward.