BOGOTA, Colombia — A judge in Colombia rejected a plea deal offered to an Australian woman charged with drug trafficking Wednesday, calling into question the prosecution’s effort to establish her guilt.

Cassandra Sainsbury’s lawyer and prosecutors had reached an agreement that would have allowed the 22-year-old to leave prison after serving six years and paying a fine.

But a magistrate in Bogota refused to accept the agreement, asking why prosecutors did not examine her phone and email records after Sainsbury said she’d acted under threat.

“She maintains she did this against her will,” her attorney, Herran Vargas, said in an interview with The Associated Press. “If there are threats, there can’t be a plea deal.”

Prosecutors declined to appeal the judge’s decision.

“Tomorrow, she will submit the indictment against you with evidentiary elements that she has in order to begin a trial against you,” a court office translating proceedings to Sainsbury said.

Sainsbury, accompanied in court by her family, nodded her head calmly in response before being led out of court by a heavy contingent of police officers and a bevy of journalists.

Sainsbury’s arrest in April captivated attention in Australia and shone a light on foreign drug mules in Colombia, the world’s largest cocaine producer. As tourism to Colombia has boomed, the country’s drug cartels have increasingly begun recruiting foreigners to smuggle cocaine out of the South American country.

If found guilty, Sainsbury faces up to 21 years in jail.

Her family has maintained in the past that Sainsbury was set up, and no details have been provided on what sort of threats she may have been facing or who exactly made them.

Authorities in Colombia contend she tried to board a flight at Bogota’s international airport with almost 6 kilograms of cocaine. Investigators say an X-ray machine detected the cocaine hidden in 18 different packages stashed in her luggage.

The 22-year-old was preparing to board a flight to London on her way back to Australia when she was stopped.

Her family mounted a campaign online to hire an attorney and has been present at all of her court proceedings. She is being held at a woman’s penitentiary located not far from the airport.

Colombia’s police force is among the best-trained to detect and stop drug smuggling thanks in part to billions of dollars in U.S. anti-narcotics aid that has strengthened law enforcement.