While working as an American contractor across the Middle East, Tairod Pugh earned a reputation for his abilities as an airplane mechanic and for his extremist views.

When the Islamic State beheaded its first American hostages in 2014, for instance, Mr. Pugh, 48, did not seem upset like his colleagues working at a small airline that serviced American military bases.

Instead Mr. Pugh leapt to the group’s defense, telling his co-workers that the Islamic State, just like any other group, “had a right to defend itself,” his manager at the time, Aamer Aslam, testified on Monday in Federal District Court in Brooklyn, at the start of Mr. Pugh’s trial on charges that he had planned to provide support to the militant group.

That was only one of Mr. Pugh’s inflammatory remarks, part of a pattern that began at least as early as 2001, when a colleague of Mr. Pugh tipped off the F.B.I. that he sympathized with Osama bin Laden, according to the prosecution’s legal filings in the case.