A high-stakes dispute over whether an indictment will stand against former FBI Director James Comey is putting attention on grand juries and how they work in secret to bring charges in U.S. federal courts.

The U.S. Justice Department admitted there may have been a problem in how Comey’s case was presented to a grand jury in Alexandria, Virginia. Comey wants the case thrown out on grounds that the government was being vindictive, among other objections.

Comey is charged with making a false statement in 2020 and obstructing Congress. He’s pleaded not guilty and denied wrongdoing, saying it's a case of political retaliation by President Donald Trump.

The case marked a dramatic escalation of the president’s extraordinary use of executive power to target his political rivals and his efforts to pressure the Justice Department to pursue prosecutions of people he disdains.

Here’s a primer on how grand juries work:

The roots of America’s grand jury system go back centuries to England, where everyday people, independent of the king, were asked to decide whether someone committed a crime.

“It was grafted into our constitution: No federal case can be charged without consideration of a federal grand jury,” said Mark Chutkow, a former federal prosecutor.

Matthew Schneider, a former U.S. attorney in Detroit, said the legal threshold for returning an indictment is lower than the standard for a jury to convict someone.

“They’re not being asked to decide, beyond a reasonable doubt, whether a crime occurred,” he explained. “They’re being asked if there’s probable cause that a crime occurred."

A grand jury has 16 to 23 people who meet in private. People summoned to federal court can serve for months, though they’re not in session each day.

A prosecutor presents evidence through witnesses and other means. Chutkow said a judge doesn’t participate unless there are problems with a witness.

The grand jury doesn’t need to make a unanimous decision. Twelve votes are needed to return an indictment.

Grand jurors are sworn to secrecy, along with prosecutors and investigators. People who are called as witnesses can later speak publicly, although authorities might discourage it.

And while prosecutors arrange the proceedings, a grand jury can make its own requests to see a witness or consider additional evidence, Chutkow said.

A New York state judge is famously credited with saying a grand jury could “indict a ham sandwich,” meaning prosecutors don’t face much resistance in getting someone charged. But grand juries can reject an indictment or perhaps limit it, depending on evidence.

Grand jurors in Washington have declined to return some indictments since the Trump administration deployed National Guard troops on the streets there. Critics of the Justice Department said the government was pursuing weak cases. U.S. Attorney Jeanine Pirro said "the system here is broken on many levels,” and she blamed politics for a grand jury's failure to charge someone accused of threatening the president.

U.S. Magistrate Judge William Fitzpatrick said he reviewed a transcript and had questions about whether the full grand jury had reviewed the two-count indictment against Comey. A Justice Department lawyer conceded Wednesday that the full jury did not.

Michael Dreeben, Comey's lawyer, said that the government's failure to present the final indictment to the entire grand jury is grounds for dismissing the case. U.S. District Judge Michael Nachmanoff, who would oversee any trial, said he needed time to make a decision.