RICHMOND, Va. (AP) — A judge on Thursday ordered the release of a former Marine who was detained for psychiatric evaluation after posting strident anti-government messages on Facebook.

Prince George County Circuit Judge W. Allan Sharrett said at the end of a one-hour hearing that the involuntary commitment order issued by a magistrate against Brandon J. Raub was invalid because it contained no allegation or basis to hold him, according to the head of a civil liberties organization that represented the 26-year-old veteran.

"This is a great victory," Rutherford Institute executive director John Whitehead said. "He's a good human being. He just got caught in some weird bureaucratic meanderings and the judge recognized that there's really no true facts to hold this man in a psychiatric ward."

Raub was released from the Salem Veterans Affairs Medical Center late Thursday and was on his way back to his home in the Richmond area, a Rutherford Institute spokeswoman said. Both Raub and his mother, Cathleen Thomas, were unavailable for comment.

Raub, who served in Iraq and Afghanistan, was taken into custody Aug. 16 after being questioned by Chesterfield County police and federal agents about his Facebook posts. The FBI said the interview was prompted by complaints from people who read his ominous posts, including some that spoke of a pending revolution. One said "a day of reckoning" was coming, and another said: "Sharpen my axe; I'm here to sever heads."

Onlookers shot a video of Raub being led away from his home in handcuffs and posted it on You Tube, fueling a groundswell of support for the veteran and criticism that the government was trampling on his free-speech rights. The Charlottesville-based Rutherford Institute came to his defense, characterizing the government's actions as those of a police state. Raub was not charged with a crime.

"Brandon Raub was arrested with no warning, targeted for doing nothing more than speaking out against the government, detained against his will, and isolated from his family, friends and attorneys," Whitehead said. "These are the kinds of things that take place in totalitarian societies. Today, at least, Judge Allan Sharrett proved that justice can still prevail in America."

He called Raub's release a victory for the First Amendment.

"People a have right to go on Facebook or the Internet (and) say things that people might not agree with, "Whitehead said. "But that doesn't mean they're crazy or should be incarcerated for it."

Raub initially was taken the John Randolph Medical Center in Hopewell, where he was held over the weekend for a preliminary evaluation. After a hearing Monday, another judge ordered Raub detained for an additional month and transferred him to the Salem VA hospital.

Thursday's hearing was expected to be limited to Raub's objection to the transfer, so Whitehead said Sharrett's decision came as a surprise.

"The petition is so devoid of any factual allegations that it could not be reasonably expected to give rise to a case or controversy," the order says.


Associated Press Writer Michael Felberbaum contributed to this report.