Updated

The flamboyant former leader of Mexico's powerful teachers union has been released from custody after a court determined there weren't sufficient grounds to proceed in a yearslong money-laundering case, her lawyer said early Wednesday.

Attorney Marco Antonio del Toro read a statement from Elba Esther Gordillo in which she said the court had advised her at 11:30 p.m. Tuesday that she was free. She said she would make no further comment until Aug. 20.

Gordillo had been under house arrest in a tony Mexico City neighborhood in recent months.

Gordillo had started as a teacher and is still referred to as "la maestra." She rose to lead the union for many years and was long an influential and senior figure in the ruling Institutional Revolutionary Party, or PRI.

When she was arrested in early 2013, she was accused of embezzling about $160 million, funneling union funds into private bank accounts with the help of assistants. The case was investigated as organized crime, but she was never convicted.

Her spending — on luxury clothing brands, plastic surgery, homes in San Diego — became legendary and contrasted strongly with the realities of her poorly paid teachers. For years she could reliably deliver teachers' votes to the PRI, but then switched her allegiance to the conservative National Action Party, helping them break the PRI's reign with wins in 2000 and 2006.

Her arrest came under the current administration of the PRI's Enrique Pena Nieto. One of Pena Nieto's primary achievements was an education reform that had been opposed by teachers and undercut some of the unions' strength. Her arrest came after the reform was enacted over union objections.