When FBI agents searched Ari Elias Baum's Facebook page, they were looking for evidence of a terrorist in training.
They already knew about Baum's posting of a photo depicting a couple dressed in military garb and holding weapons, with the caption, "Husband and wife fighting for Islam. The most beautiful photos I have ever seen."
The FBI also knew about the Buffalo man's travels to Yemen and Facebook friendship with a man whose inflammatory posts had come to the attention of terrorism investigators.
Baum was never charged with any terrorism crime but he will stand trial later this month for Social Security fraud, and the government would like to resurrect the terrorism claims as part of its prosecution.
That was until a federal judge said no.
"The terrorism allegations are baseless," said Brian P. Comerford, Baum's defense lawyer. "This is just a Social Security case, and he's prepared to defend himself."
It's no secret the government's prosecution of Baum began as an investigation by the FBI's Joint Terrorism Task Force in Buffalo and that he was eventually placed on the nation's no-fly list.
It's also no secret Baum is bipolar and that many of the initial allegations against him were unsubstantiated, recanted or otherwise unproven.
The ruling by U.S. District Judge William M. Skretny, which came just four weeks before Baum goes on trial, will force federal prosecutors to avoid any reference to the terrorism investigation in front of the jury.
"Any mention of terrorism, religious extremism or terrorist ideology would be extremely prejudicial to Mr. Baum and has no relevance to the crimes charged in the indictment," Comerford, an assistant federal public defender, said in his court papers.
Skretny agreed and, in his ruling, said his concern is that a jury would view Baum's beliefs and actions as controversial and punish him for something other than the crimes he's accused of committing.
He ordered prosecutors to stay away from any mention of the terrorism investigation but allowed them to get into Baum's travels overseas, as well as make general references to his religion.
"That background has no bearing on the crimes charged," Skretny said of the terrorism investigation into Baum.
Baum is charged with Social Security fraud and making false statements, and the evidence against him was uncovered as part of the FBI's terrorism investigation. The evidence includes an alleged Facebook conversation between Baum and his stepfather while Baum was traveling overseas.
"How is your money holding out?" asks his stepfather, Dr. R. Bruce Baum.
"Life is cheaper here but I will lose the SSI eventually if I stay here because they will find out that I am out of the country," Baum replied.
Prosecutors view the conversation as an admission of guilt, but think jurors are going to wonder how the FBI came to search Baum's Facebook page.
"The government does not propose an in-depth review of the terrorism investigation," Assistant U.S. Attorney Jonathan P. Cantil said in court papers. "However, it is important to convey to the jury that the government did not search the defendant's Facebook page on a fishing expedition."
The FBI's investigation into Baum became public shortly after his arrest on fraud charges three years ago. The four-count indictment against him claims he stole $4,277 in Social Security disability benefits over a four-month period in 2013.
The unrelated allegations tied to terrorism, including the central and still unproven claim that Baum attended a terrorist training camp, have been disclosed over the years as his case unfolded.
One of the claims is that Baum received a text from an unspecified individual in 2011 saying, "Jesus rose again today...ha...ha...ha. I heard you are being trained for being used as a terrorist."
The FBI's search of Baum's Facebook page was also based on two confidential sources who said Baum "lectured" them in 2013 about the Arab Spring, told them he had been to Syria and said he was "not afraid to die."
A third source reportedly told the FBI that Baum was fixated on converting family and friends to Islam and that he was bipolar, off his medication but harmless.
"There is no indication that he ever threatened anyone, that he committed any crimes or that he associated with any terrorists," Comerford said in his court papers.
Never charged in connection with the terrorism allegations, Baum was indicted by a grand jury on the Social Security fraud charges and, early on in the case, his mental health became a focal point.
Court papers describe him as bipolar and the two sides have argued over whether his mental health should be introduced at his upcoming trial.
Prosecutors claim any mention of Baum's mental health will divert the jury from its core mission – deciding whether he defrauded the Social Security disability system.
"The type of disability the defendant has is irrelevant," Cantil said in court papers.
In seeking permission to talk about Baum's mental health, defense lawyers made it clear they want the jury to understand why their client, despite a healthy physical appearance, was collecting disability benefits.
"The jury should know, at a minimum, that Mr. Baum received benefits because of a psychiatric disorder, not a physical condition," Comerford said.
In the end, Skretny ruled that evidence of Baum's mental health will be allowed during his trial because the jury might otherwise "question why the defendant who appears able-bodied, was receiving disability benefits."
Jury selection for Baum's trial begins Sept. 19.