(CNN) A federal judge in Maryland said Thursday that Christopher Hasson, a Coast Guard lieutenant accused of plotting a domestic terror attack, will be released from detention.

Judge Charles Day agreed that the government had not met a standard for continued detention but said he still had "grave concerns" about Hasson's alleged actions, which included amassing an arsenal of guns and tactical gear and searching online for the home addresses of two Supreme Court justices.

Hasson's defense attorney will propose options for supervised release at a future hearing.

"He's got to have a whole lot of supervision," Day said. "Somebody who's got eyes and ears on him like nobody's business."

Prosecutors say Hasson is a white supremacist who had a hit list that included prominent Democratic politicians as well as several journalists from CNN and MSNBC.

Hasson conducted an internet search for "are Supreme Court justices protected" before searching for the home addresses of two unnamed justices, court documents revealed.

The documents say Hasson espoused extremist and white supremacist views, and searched online for the "best" gun with which to kill African Americans.

Prosecutors say that in August 2017 Hasson searched "white homeland" and "when are whites going to wake up." Months later he allegedly searched "please god let there be a race war."

Hasson was first charged in February and faces counts of unlawful possession of two improperly registered silencers, possession of a narcotic opioid and possession of 17 firearms as an unlawful user and addict of a controlled substance. If convicted on all four counts, he could receive 31 years in prison. There is no federal domestic terrorism statute under which he could be charged.

Hasson's public defender Elizabeth Oyer told the court, "I fear that through the vivid imaginations and colorful writing of the prosecutors, the case has developed a profile that does not line up with the facts."

Oyer referenced President Donald Trump multiple times, comparing her client's racial slurs and targeting of Democrats and the media to similar views that the President has taken.

Oyer said the list of names Hasson had allegedly assembled didn't amount to a hit list but "looks like the sort of list that our commander in chief might have compiled while watching Fox News in the morning."

She added that while the racial slurs Hasson allegedly used in private writings were condemnable, they are now part of the "national vocabulary."

"Donald Trump uses similar epithets in his everyday language and tweets," Oyer said.

Thomas Windom, an assistant US attorney, showed multiple photos of Hasson's guns stashed in a closet feet from his bed, and at one point, lifted a weighted vest that police had recovered.

"This is combat gear. There is no reason to have this," Windom said. "The defendant intended to ... take his weapons and go."

Windom also described how Hasson had made the two illegal silencers "clandestinely" with a drill press. The silencers were coated with gunpowder -- showing that Hasson had used them, Windom said.

"He intended to use them in a sniper attack," Windom said. "These are pure killing devices."

In court Thursday Oyer accused prosecutors of "cultural bias" in their fixation on Hasson's weapons cache, saying he was a hunter and 30-year member of the military who until 2016 had lived in North Carolina, where gun ownership is more accepted.

Oyer also downplayed the steroids found in Hasson's possession, saying he had used them in the past but was not taking them at the time of his arrest.

Hasson will not be released from custody immediately as the details of his supervised release are being agreed upon. Day instructed Oyer to confer with prosecutors in the case and propose options that he will select from at a future hearing that was not yet scheduled.

Oyer floated possibilities that included Hasson living with his wife and her parents in Virginia Beach, Virginia, or with his own parents in Arizona, though Day said he was opposed to sending Hasson to Arizona.

Day sympathized with the prosecutors' position, saying they faced a "very difficult, challenging set of facts," but ultimately determined that the charges Hasson faced should not warrant continued detention.

"I do not find that detention is appropriate," Day said.

This story has been updated.