A federal judge in California cleared the way on Wednesday for the widow of gunman Omar Mateen, who killed 49 people at a nightclub in Florida, to be released from jail.
The judge said it is "debatable" whether the government has enough evidence to convict her of helping her husband plan the attack.
Noor Salman, 30, was arrested in California in January and was charged with helping Mateen plan the attack and concoct a cover story for him.
US Magistrate Judge Donna Ryu however said there is no proof the woman has ties to Daesh or extremist views.
"She herself is not charged with providing material support to a terrorist organisation," the judge said, noting that Salman has no criminal record and that friends and former teachers called her "peaceful and nonviolent."
Prosecutors want Salman to remain jailed before her trial in Florida. But Ryu said in an Oakland courtroom that the government had not shown Salman was a danger to the community or a serious flight risk.
Salman's husband, Omar Mateen, was killed in a shootout with police after he took hostages during a three-hour standoff at the Pulse nightclub and carried out the deadliest mass shooting in modern US history.
Prosecutors have said Salman accompanied Mateen on scouting trips to the nightclub and other possible targets — including a Disney attraction. They say she told FBI agents that she knew Mateen was planning the attack.
The judge said on Wednesday that prosecutors have provided no evidence. They have not offered transcripts, recording or video of Salman's 16-hour interrogation, which she faced without a lawyer in the hours after the June 12 attack, Ryu said.
One of Salman's lawyers, Linda Moreno, said the approved release "doesn't usually happen in a so-called terrorism case."
Ryu gave prosecutors in Florida 48 hours to challenge her ruling, meaning Salman could not walk free from jail until Friday at the earliest.
If released, Salman will live with her uncle in the San Francisco Bay Area and be required to wear an electronic monitoring device. She can only leave the house for court appearances, meetings with her lawyers and doctor's appointments. Salman's 4-year-old son with Mateen is living with her mother and will be allowed to visit.
Outside the courtroom, her uncle, Abdallah "Al" Salman, with whom she will live, again declared his niece innocent.
"She does not read between the lines," he said, reiterating that she has learning disabilities and did not have the capacity to aid in the massacre.