Oregon standoff defendant Sean Anderson apologized Wednesday for his video rants that went viral when he was one of the last occupiers at the Malheur National Wildlife Refuge.

Anderson, 47, dressed in the standard blue jail scrubs, stood beside his lawyer and said he was sorry.

"I was very embarrassed," he said, when earlier this week he watched the videos played in court for the first time.

"I am very ashamed of it,'' he said.

Anderson spoke at the urging of U.S. District Judge Robert E. Jones, who said he wanted to hear directly from the defendant before reviewing a magistrate judge's order calling for Anderson's release before trial.

Anderson asked the judge to understand his frame of mind at the time. He was disturbed by the police shooting death of his friend, refuge occupation spokesman Robert "LaVoy" Finicum, on Jan. 26 and said he "heard the FBI was going to come in and kill all of us.''

Jones said he didn't ask for Anderson's justification of his actions, but wanted to understand how he feels now.

Anderson was one of the last four people to surrender at the federal bird sanctuary on Feb. 11, ending the 41-day armed occupation.

In one video the government presented to the court, Anderson urged people to come to the refuge and "fight for your country,'' suggesting that the "media has been waiting for a bloodbath'' and "now there's going to be one...''

The video shows Anderson carrying a rifle as another occupier drives an excavator -- both digging defensive trenches on the refuge in anticipation of a government raid, according to prosecutors.

Sean Anderson

In another video, Anderson described the unfolding situation as a "free-for-all Armageddon,'' referred to law enforcement officers "who don't abide by their oath'' as the enemy and added: "If they stop you from getting here, kill them.''

In a third video taken Jan. 27, Anderson is carrying a rifle and discussing the need to "keep your eye in the sky,'' with four gunshots then heard off screen. Anderson wasn't seen on the video firing into the air, but admitted later to firing his gun. An FBI surveillance plane was in the air at the time, and a pilot reported seeing shots fired from the ground, Assistant U.S. Attorney Geoffrey Barrow wrote in a court brief.

Jones said the alleged firing of a weapon in the air is "absolutely inexcusable'' and characterized the videotaped messages as "outrageous beyond any doubt.''

Barrow had argued that Anderson remains a danger to the community, has strong anti-government views and had founded a militia group when he lived in Wisconsin. The prosecutor noted that Anderson doesn't believe the court has jurisdiction in the pending federal conspiracy case.

"If that's still his claim, then he can stay here in custody,'' the judge remarked.

"You renounce that view?'' Jones asked Anderson.

"Yes sir,'' Anderson said.

Anderson's lawyer Matthew McHenry argued that Anderson could be released with conditions and pointed to a psychologist's assessment that indicated he isn't a high risk of violence now.

Anderson can return to his wife in Riggins, Idaho, the judge ruled.

Jones determined that Anderson isn't a flight risk and urged Idaho County Sheriff Doug Giddings, who wrote a letter to the court in support of Anderson, to monitor Anderson's release and report any violations of his conditions.

Anderson marks the 14th of the 26 defendants facing federal conspiracy charges in the refuge case who have been released from custody pending trial.

Anderson must find a job and remain in Idaho County, unless he has to travel to Oregon to attend court or meet with his lawyer. He can't have any contact with any self-styled patriot movement and can't access any social media on any patriot groups, the judge said.

Jones eased a proposed restriction that would have barred Anderson from discussing the pending case with his wife and co-defendant, Sandy Anderson, who was released from custody in February.

"That's not realistic,'' Jones said.

Anderson can talk about the case with his wife, but there's "not to be any intimidation of his wife,'' the judge said.

"He got her in enough trouble,'' Jones added.

-- Maxine Bernstein

mbernstein@oregonian.com

503-221-8212

@maxoregonian