AKRON, Ohio - An undercover FBI agent who testified Friday against a terrorism suspect on trial in Akron said he was driving behind a car in a city outside Dallas when two men got out of the car and opened fire in an Islamic State-inspired attack in May 2015.

The agent, who testified under the pseudonym Steven Jane, said he went to Garland, Texas near "The First Annual Muhammad Art Exhibit and Contest" to develop his relationship with Erick Jamal Hendricks, then the target of an FBI investigation.

While Jane had previously talked to one of the attackers, he said he didn't know Elton Simpson and Nadir Soofi also were in Garland. He said he had no advance knowledge of the pair's plans and was as surprised as anyone when he saw gunfire being exchanged.

Simpson and Soofi wounded a security guard and died after a police officer shot them.

Jane's testimony lasted all day Friday as he detailed his interactions with Hendricks and Simpson, all of which took place through Twitter and various encrypted messaging apps. He is a key witness in Hendricks' trial, in which testimony began Thursday in U.S. District Judge John Adams' courtroom in Akron.

Adams approved a set of unusual measures to protect the undercover agent's identity, which included having the agent use a pseudonym and wear a light disguise. He also closed the courtroom Friday to everyone other than the himself, the jury, attorneys, defendant and essential court personnel.

Others, including a cleveland.com reporter, sat in another courtroom and listened to the agent's testimony through a laptop connected to a TV. When prosecutors showed exhibits, the images appeared on the TV screen.

Hendricks' connection to the Garland attack is a key piece of the government's case against him. Justice Department attorney Rebecca Magnone told the jury Thursday that Hendricks was "unequivocally tied" to the attack.

Hendricks' attorney David Doughten argued in his opening statement that the government cannot prove the social media handles it cites as belonging to Hendricks were actually his.

Jane rarely used the defendant's name on Friday, but the FBI has said Hendricks was behind all the online handles the agent referenced.

The vast majority of Jane's testimony pertained to his online conversations with Hendricks, which took place between March and May 2015. Jane said Hendricks showed a deep-seated sense of paranoia, frequently changed his handles on various messaging apps and told the agent to do the same.

The agent also said Hendricks took other measures such as putting spaces between letters when he texted certain Islamic terms in order to avoid detection by any software the apps contained to find and flag certain words. Screenshots of the conversations between Hendricks and the agent showed that this was a pattern.

"This person clearly demonstrated they were concerned about spies early in the conversation," Jane testified.

Hendricks made it clear that he was an ISIS supporter and spoke of using acres of land to train recruits, the agent said.

The agent said Hendricks' messages were constant. At one point, Jane said he asked Hendricks if he worked, and Hendricks said "my work is for Allah. It is my full-time job."

Hendricks had the agent reach out to potential recruits to vet them. Several were actually FBI informants, Jane testified.

But Hendricks also had Jane reach out to Simpson, a little more than a week before the attack in Garland, the agent said.

It was during that conversation in April 2015 that Simpson asked Jane whether he was aware of the then-upcoming event in Texas.

Simpson told the agent that he had tweeted about it and received many responses, including from a "muj," a reference to a muhajed, or a person of Muslim faith willing to die to defend their religion.

"And you can assume what the muj said about such event," Simpson messaged the undercover agent.

Jane, however, said it was his response to posit "what somebody else, a third party, what a mujahed would say."

He said he never spoke to Simpson again and didn't know Simpson and Soofi would be in Garland.

Instead, he traveled to Texas at Hendricks' urging. The trip was approved by the FBI and the agent was in contact while there with a Garland police officer assigned to an FBI task force in Dallas, he testified.

Jane drove near the event and told Hendricks what he saw, including security measures, the agent said.

To further the conversation, Jane said he texted Hendricks that law enforcement doesn't realize "a lion starring them down from behind the tall grass and in the woods."