Story highlights Sandra Ávila Beltrán, known as "The Queen of the Pacific," leaves prison

A judge ruled in favor of her appeal last week

She has been accused of drug trafficking but never convicted

(CNN) In Mexico's male-dominated drug trade, her life story became a legend.

Now, after more than seven years behind bars, the woman known as "The Queen of the Pacific" is free. A judge ruled in favor of her appeal last week, Mexico's Attorney General's Office said in a statement Saturday.

Sandra Ávila Beltrán's story is the subject of a best-selling book and a popular ballad.

She was first arrested in Mexico City on September 28, 2007, smiling before cameras as authorities trumpeted her detention.

Later, Ávila made headlines when Mexican authorities said they were investigating a tip that she had received Botox treatments in prison