NEW YORK (Reuters) - A U.S. Air Force veteran betrayed his country and tried to become a fighter for the militant group Islamic State, federal prosecutors told a New York jury on Monday at the start of his criminal trial.

Tairod Nathan Webster Pugh traveled to Turkey in an effort to join Islamic State after he “immersed himself” in the group’s violent propaganda, watching videos of beheadings and expressing approval on Facebook, Assistant U.S. Attorney Mark Bini said in Brooklyn federal court.

But Pugh’s defense lawyer, Eric Creizman, said Pugh’s only crime was to voice support for Islamic State and that there was no evidence he planned to cross into Islamic State-controlled territory in Syria from Turkey.

“In this country, you don’t punish a person for his thoughts,” he said.

The case appears to be only the second Islamic State-related prosecution to reach trial, out of more than 75 brought by the U.S. Department of Justice since 2014.

Earlier this month, Abdul Malik Abdul Kareem, who is accused of plotting with others to attack a Prophet Mohammed cartoon contest in Texas, went on trial in Phoenix. Two of his alleged associates were killed in a shootout with police at the event.

Pugh, 48, was detained by Turkish authorities in Istanbul in January 2015 after he returned from a year-long stint living in Egypt.

U.S. investigators say they found a letter to Pugh’s Egyptian wife on his computer declaring he would “defend the Islamic States” and saying he had two options: “Victory or Martyr.”

They also discovered approximately 180 jihadist videos on his laptop, including one that showed Islamic State militants executing prisoners, according to prosecutors. Pugh destroyed four portable data drives upon being detained.

Pugh served as an avionics specialist in the Air Force from 1986 to 1990. In 2001, while Pugh was working as a mechanic for American Airlines, a co-worker tipped off the FBI that Pugh had expressed support for Osama bin Laden and al Qaeda, according to court documents.

Pugh later worked as an Army contractor in Iraq from 2009 to 2010, prosecutors said.

U.S. District Judge Nicholas Garaufis has taken the rare step of agreeing to seal the courtroom during the testimony of an undercover FBI employee in order to protect his identity. An audio feed will be broadcast for the public in a separate courtroom, Garaufis said in a court order.

The trial is expected to last two weeks.