A U.S. judge on Thursday sentenced a Mexican woman known as the "Queen of the Pacific" to time served after she pleaded guilty to being an accessory after the fact to drug trafficking.

Sandra Avila Beltrán, 52, left Miami's federal courthouse a free woman, at least technically, though her next destination is an immigration detention center where she will await deportation back to Mexico.

The sentence handed down by the judge - 70 months - is equal to the amount of time Avila has already spent behind bars since her September 2007 arrest in Mexico.

She was facing up to 15 years in prison.

The defendant, clad in a beige prison uniform and with shackles on her ankles, embraced her lawyer after the judge read the sentence.

While happy not to be prison-bound, Avila is sad about the entire experience because she "was never involved in drug trafficking," defense attorney Stephen Ralls told reporters outside the courthouse.

Under an agreement with federal prosecutors, Avila pleaded guilty in April to having assisted her then-boyfriend, Colombian national Juan Diego Espinosa, between June 2002 and March 2004 as he attempted to evade arrest for drug trafficking.

Though acquitted in Mexico on drug and racketeering charges, Espinosa and Avila were both extradited to the United States.

Avila's plans now are to return to her family in Guadalajara, Ralls said.

Avila is the niece of Miguel Angel Felix Gallardo, alias "El Padrino" (The Godfather), who is serving a long prison sentence in Mexico; and grand-niece of Juan Jose Quintero Payan, a co-founder of the Juárez cartel who was sentenced in the United States to 18 years in prison on drug trafficking charges.

The first public mention of the Queen of the Pacific came in a 2004 "narcocorrido," or drug ballad, by Los Tucanes de Tijuana.

Mexican media have likened Avila to the main character in Spanish writer Arturo Pérez-Reverte's novel "La Reina del Sur" (The Queen of the South), which was subsequently turned into a hit television miniseries. 

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino