(CNN) A federal judge in Denver has ordered the release of an Uzbek terror suspect who was held without trial for more than five years.

Jamshid Muhtorov is also the first defendant to be prosecuted on evidence gathered by a controversial NSA surveillance program.

US District Judge John Kane ordered Muhtorov be released from GEO Aurora Detention Center to home detention, according to the courtroom minutes obtained by CNN . The order is stayed until Thursday, pending evaluation of his home.

CNN reached out to the US Attorney's Office in Colorado, the Department of Justice and the public defender representing Muhtorov for comment.

Muhtorov's trial, which was set to begin on July 31, has now been moved to March 12, 2018.

Muhtorov, a refugee from Uzbekistan who lived in Aurora, Colorado, was charged five years ago with providing and attempting to provide material support to a designated foreign terrorist organization called the Islamic Jihad Union, or IJU, according to court records.

Muhtorov was taken into custody in January 2012 at Chicago's O'Hare International Airport, when he was about to board a flight to Istanbul. Court records show that federal investigators monitored phone calls and Internet activity by Muhtorov, who also uses the names Abumumin Turkistony and Abu Mumin.

The judge's ruling Friday came a day after Muhtorov filed court documents accusing the detention center's warden of violating his rights to a speedy trial.

Judge: Suspect in detention for more than five years

In his 11-page order, obtained by CNN, Kane said his ruling was precipitated by the postponement of the trial of Muhtorov's alleged co-conspirator, Bakhtiyor Jumaev. Jumaev's trial has been pushed to January 2018.

The judge also said Muhtorov was not a flight risk, citing his family and community ties.

"That is not to say that the government's charges are without merit or that the words and conduct of Jamshid Muhtorov are not serious or without consequence," Kane said in the order, signed Friday.

"To the contrary," the judge wrote. "The government, by its actions in surveilling and apprehending Mr. Muhtorov, may have thwarted an actual plan to provide smartphones and services to the IJU. The content of Mr. Muhtorov's conversations with (alleged accomplice) Mr. Jumaev are abhorrent, the videos and pictures on his phone revolting. His professed desire to join a movement that justifies the murder and maiming of all who dare to think differently than he does on matters of faith and religion deeply offend our values of religious liberty, the sanctity of life, tolerance, justice, and the rule of law."

The ruling goes on, "Nor is there any doubt that the men and women of our security services and intelligence communities act and have acted with the utmost rigor and good faith. Mr. Muhtorov, however, has already spent more than five years in detention before even being found guilty of acting, in any way, on his alleged terrorist beliefs."

CNN Legal Analyst and former New York prosecutor Paul Callan said a pretrial delay of this magnitude "is highly unusual."

"According to a federal court study during the time period between 1990 and 2015, the average amount of delay between the filing of criminal charges and trial in the federal courts ranged from a low of 7.1 months to a high of 16.8 months," Callan said.

"In my experience, federal criminal defense attorneys report that serious felony cases are routinely brought to trial in well under two years in most federal jurisdictions."

First case using information from NSA surveillance

Muhtorov's case is also significant because the government is prosecuting a defendant using information gathered by a controversial National Security Agency surveillance program.

"The Denver case appears to be the first reported attempt by the government to use information from warrant-less wiretap intercepts and surveillance in a criminal trial pursuant to a federal anti-terrorism law passed in the aftermath of 9/11," Callan said.

"Prosecutors say that the complex motions filed by the defense seeking to exclude this evidence from trial contributed to the delay of the trial," he added.

Muhtorov was "a merchant turned human-rights activist" who found work as a truck driver in Aurora in 2007 after he fled Uzbekistan, according to the Denver Post.

He's accused of supporting the Pakistan-based extremist group IJU and communicating with the group's website administrator.

IJU espouses an anti-Western ideology that opposes secular rule in Uzbekistan and seeks to replace the regime there with a government based on Islamic law, according to the Department of Justice.

Government officials say the IJU is known for conducting suicide attacks in Uzbekistan. The group has also claimed responsibility for numerous attacks against coalition forces in Afghanistan, according to a 2012 DOJ statement.