A federal jury on Wednesday found an Air Force veteran guilty of trying to join the Islamic State, in one of the first U.S. terror trials involving suspected ISIS ties.

Prosecutors say Tairod Pugh, 48, went to Turkey last year hoping to make his way to Syria to join ISIS.

Defense lawyers say the Neptune, New Jersey man didn't intend to find the terror group a month after he lost his job as an aviation mechanic. But prosecutors say Pugh was preparing to reject the country he had served in the Air Force from 1986 to 1990. 

Pugh appeared calm while the verdict was read in the Brooklyn, N.Y. courtroom. He never took the stand during trial testimony.

He faces up to 35 years in prison on the charges of attempting to provide material support to ISIS and obstruction of justice.

Last week, an undercover FBI agent posing as an Islamic State sympathizer testified that he was wearing traditional Muslim religious clothing when he sat down next to Pugh at Kennedy Airport last year, in an area where people waited to be cleared to enter the United States after a trip abroad. He said Pugh told him he had been sent back to the U.S. from Egypt.

"On more than one occasion, he said he expected to be arrested," the Los Angeles-based agent said, recalling that Pugh seemed nervous whenever a law enforcement person passed by.

The agent testified that Pugh warmed up to him after seeing an Islamic State flag on his Facebook page. The agent said Pugh told him that if he went to Turkey, he should not look pious.

"He said: 'Shave the beard. Wear the pants.' He said the object is to blend in," the agent recalled.

At one point, the agent said, Pugh told him: "Allah willing, the next time I travel as a tourist to the area, I'll wear a Yankees baseball cap."

On cross examination, defense lawyer Eric Creizman established that his client never told the agent he had any contact with the Islamic State or any plans to go to Syria. Creizman also had the agent acknowledge that Pugh never said he wanted to wage jihad or become a martyr.

A judge set Pugh's sentencing for September.

Fox News' Lissa Kaplan and The Associated Press contributed to this report.