College grad who worked undercover to take down terrorists since age 16 testifies in US court The young man, 25, is a central witness in the case against David Wright.

 -- BOSTON — A US college graduate who began working undercover to infiltrate al-Qaeda cells at the age of 16 made his first public appearance as a witness in a court in Boston this week.

The young man, now 25, is a central witness in the federal case against David Wright, who is on trial on charges of conspiring to provide material support to the Islamic State. Wright, 28, exchanged online messages with the young man, who was working as an FBI informant, and pledged allegiance to ISIS and shared his plot to “wage war on the kuffar [non-believers] here in America.”

Federal law enforcement officials told ABC News the informant provided the leads that helped them thwart a plot to kill police officers, and the young man testified despite what he says are ongoing threats to his life.

"I did not want to testify. It puts my life at risk,” the young man said, using the assumed name of Yusef Ali. “If they know I am here, I would be in grave danger.”

“Ali” lives Massachusetts and holds a job he says the FBI helped him secure following a dangerous journey he began almost a decade ago that has taken him far from his home in Yemen.

He testified that he was motivated to help Yemeni counterterrorism officials after one of his close friends “blew himself up” in a suicide bombing that killed five people in 2009. He spent six months training with the Yemeni military, he said, before joining an al-Qaeda cell using a bogus identity.

“These people were terrorists,” he said. “I lied every day to them to save my life.”

When his mission was over, “Ali” came to the United States on a student visa to study computer sciences at a small private college in New England.

It was there, he explained to the court, that he was approached by the FBI to become a paid informant. For the next several years — when he wasn’t studying for his degree — he was engaging with radical Islamists online for the FBI.

“What [am I] going to lose?” “Ali” said he remembered thinking about the FBI’s initial offer, saying that he volunteered to help the United States just as he volunteered to help Yemen. “I wasn’t forced to do it.”

"He really liked you," Wright's defense attorney Jessica Hedges asked “Ali” on the stand. "He looked up to you in a way?"

"I don't know," Ali answered. "Maybe.”

As their online friendship grew, “Ali” said Wright began to express increasingly extreme views and confide in him about his interactions with ISIS leaders. “Ali” testified that Wright said he was among 71 Americans who formed sleeper cells across the United States. He told “Ali” about his plan to murder police officers in a series of Facebook messages, chats on encrypted apps, and in text messages that included promises to "strike fear" in the heart of Americans and to fight the Taghut [devils] for the caliphate.

"Things changed and he started to become a bit radicalized in his views … threatening all sorts of killings,” he said. "If he was serious about his plans it could happen that day, tomorrow, a month later, a year later."

He gathered his evidence on a flash drive and turned it over to the FBI.

On June 2, 2015, Wright's uncle and best friend Usaama Rahim, another alleged ISIS supporter, confronted members of the Joint Terrorism Task Force with a large knife and was shot dead as he spoke to his father on the phone.

According to testimony in the case, Wright was questioned within hours of the shooting, and when asked about the information “Ali” gathered, he told a special agent: "One man's terrorist is another man's freedom fighter.”

Authorities say the undercover operative played a critical role in establishing Wright's alleged willingness to engage in bloodshed on behalf of the Islamic State. He also engaged Wright in conversations about how he had recruited others and maneuvered him to reveal the names of contacts he had overseas.

Wright's defense attorney has argued that her client is not dangerous but was simply living in “a world of fantastical ideas.” Pledging allegiance to ISIS, she said, was just a phase.

She also pointed out that Wright was 538 pounds at the time of his arrest and didn't have the physical capability or the financial means to pull off an act of terror.

As he stepped off the stand, “Ali” did not say whether or not he would continue to work for the FBI, only that he was grateful to the United States for giving an opportunity to "someone like me."