Story highlights Lynne Stewart is released from jail after a judge's order

Stewart was sentenced to 10 years in prison in 2010

She aided a convicted terrorist's communication from prison to his terrorist group

She is 74 years old and has a terminal, incurable illness

A former defense lawyer imprisoned for aiding a convicted terrorist's communication from prison to his terrorist group was released from prison Tuesday evening, after a judge ordered the "compassionate release."

U.S. District Judge John Koeltl granted a motion filed by federal prosecutors and the Federal Bureau of Prisons to reduce the sentence of outspoken lawyer Lynne Stewart, who was sentenced to 10 years in prison in 2010.

Stewart's "terminal medical condition and very limited life expectancy constitute extraordinary and compelling reasons that warrant the requested reduction," Koeltl wrote in his order.

"... It is further ordered that the defendant shall be released from the custody of the Federal Bureau of Prisons as soon as her medical condition permits, the release plan is implemented and travel arrangements can be made."

Stewart arrived in New York early Wednesday afternoon and is with her son and his family in Brooklyn, according to her lawyer, Jill Shellow.

"I know that she is very happy to be home," said Shellow. "I believe her immediate plan is to seek medical attention at Sloan Kettering Cancer Center."

Stewart, who is 74 and has breast cancer, was known for representing poor and sometimes unpopular clients as a defense attorney. In 1995, she represented the blind cleric Sheik Omar Abdel-Rahman, who was convicted of a long list of terrorist activities, including his part in a plot to blow up American military installations.

Abdel-Rahman is serving life in prison.

The motion filed Tuesday asked the court to release Stewart from a Texas prison because her cancer has metastasized to the lung and bone, and oncologists estimate her life expectancy to be less than 18 months. The filing said her medical condition was "terminal and incurable" and cited the "relatively limited risk" of recidivism and danger to the community from her release.

Shellow told CNN her client's supporters were "overjoyed that she will spend her remaining days with her family."

In 2000, Stewart broke her agreement to abide by measures set by the Department of Justice and Bureau of Prisons. Those measures stipulated that Abdel-Rahman not be permitted any contact with his organization, Islamic Group. After visiting Abdel-Rahman in prison, Stewart passed on a message from him to his Islamic Group followers: that Islamic Group should reconsider a cease-fire in attacks against the Egyptian government.

Stewart was disbarred in 2007 and began serving her 28-month sentence in November 2009.

In 2010, Koeltl revised his initial sentencing of Stewart from 28 months to 10 years in prison.

Wearing navy blue prison garb and handcuffs, Stewart entered a crowded courtroom to a standing ovation.

"The pain is overwhelming" said Stewart, who paused to compose herself several times while speaking. "Prison has diminished me."