The alleged daughter of Mexico's most-wanted drug lord was freed from the U.S. and returned to Mexico after pleading guilty to an immigration charge.

The pregnant Alejandrina Gisselle Guzmán Salazar, 31, pleaded guilty in San Diego on Monday to fraud and misuse of visas, and U.S. District Judge Cathy Ann Bencivengo immediately ordered her release.

"She's happy to be back in Mexico and out of custody to have her baby," her attorney, Guadalupe Valencia, said Wednesday. "She's a doctor and will go back to her life before she was arrested."

Guzman Salazar identified herself as a daughter of Joaquín "El Chapo" Guzmán, head of Mexico's Sinaloa cartel, when she tried to enter the U.S. at San Diego's San Ysidro port of entry Oct. 12, according to U.S. officials who spoke on condition of anonymity to discuss aspects of the investigation that have not been made public.

Guzmán Salazar told border inspectors she intended to go to Los Angeles to give birth to her child, according to a criminal complaint. Valencia said Wednesday that she is about eight months pregnant.

In an agreement with prosecutors, she acknowledged attempting to enter the U.S. on someone else's visa and agreed to leave the country if ordered by immigration authorities. Prosecutors agreed to drop charges of making false statements and identity theft.

U.S. Customs and Border Protection does not comment on individual cases, spokeswoman Angelica DeCima said when asked about Guzmán Salazar's status. Valencia said she was back in Mexico on Tuesday.

The Sinaloa cartel, named after the Pacific coast state of the same name, controls trafficking along much of the U.S. border with Mexico, particularly in western states.

Guzmán Salazar's mother is Maria Alejandrina Hernández Salazar, according to one U.S. official. The U.S. Treasury Department described Hernández Salazar as Joaquín Guzmán's wife when it imposed financial sanctions on her in June.

Based on reporting by the Associated Press.

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