As a police officer, Nicholas Young knew enough about undercover surveillance to be paranoid about it. But he seemed to trust "Mo," an acquaintance who described himself as a U.S. military veteran of Palestinian descent.

Unfortunately for him, "Mo" was an undercover FBI informant who recorded his conversations, and Young, who served the Washington, D.C., region's Metro system until his arrest last year, is now the first law enforcement officer in the U.S. to be tried on charges of trying to help the Islamic State.

Jurors in federal court in Alexandria learned Tuesday about the sting operation, hearing how the FBI crafted Mo's persona to win Young's trust.

Mo himself took the stand, shielded from public view by a large screen to keep his true identity a secret. The jury also heard secretly recorded conversations in which Young gives Mo advice on how to travel overseas undetected by law enforcement.

"I'm so paranoid, like I don't trust anyone," Young confided to Mo in 2014.

Young had in fact been under surveillance for more than five years, since at least 2010, according to court records and testimony.

He is charged with attempting to provide material support to terrorists, after buying gift cards in 2016 that he allegedly intended Islamic State operatives to use to purchase mobile messaging apps. Young actually gave the codes for the gift cards to an undercover FBI officer, according to court records.

Young argues that the sting operation amounts to entrapment.

His defense attorneys have noted that it's unlikely authorities viewed Young as a true threat, because they allowed him to work as an armed police officer during all those years he was under surveillance.

Because of the entrapment defense, prosecutors are trying to show that Young was predisposed to commit such conduct, and that no one involved in the sting steered conversations to discussions about the Islamic State.

Under cross-examination, the FBI agent responsible for handling Mo said he didn't recall ever telling Mo to steer conversations toward the Islamic State.

But his testimony also included discrepancies about when the FBI recorded conversations between Mo and Young, and when it did not.

Mo's testimony on cross-examination was similarly confused on the issue of when their conversations were recorded.

Prosecutors have said they plan to introduce evidence that Young is a Nazi sympathizer who trafficked in Nazi memorabilia and suggested offering prayers for Adolf Hitler.

Defense attorneys have argued that the Nazi evidence is unfairly prejudicial and irrelevant, but prosecutors argue that Young's support of the Islamic State is consistent with Nazi ideology, linked by a shared anti-Semitism.

The judge has warned prosecutors about overly prejudicial evidence but has not banned prosecutors from discussing some of the Nazi evidence.