Updated

A judge in Colombia has rejected a plea deal offered to an Australian woman charged with drug trafficking, meaning she could potentially serve a longer prison sentence if convicted.

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 Wednesday, pushing the case toward trial.

Sainsbury was arrested in April at Bogota's international airport after an X-ray machine detected cocaine hidden in 18 different packages stashed in her luggage. Her family has said in the past that she was set up.

She could face up to 21 years in prison if found guilty.