WASHINGTON — He was a lonely gamer who called George Washington a terrorist, defended ISIS on endless Twitter rants and thought he trolled the NSA, ATF and the FBI.

In the end, prosecutors said an undercover FBI agent turned the tables on Romeo X. Langhorne, a Virginia resident now under arrest for providing material support to ISIS.

Langhorne even predicted he could be stopped by a covert law enforcement officer, according to detailed online communications revealed Thursday.

Authorities said Langhorne, 30, was on a mission to create improved web videos for ISIS sympathizers, instructing them on how to make explosive chemicals.

A special agent with the FBI’s Joint Terrorism Task Force said Langhorne wanted to produce a video about TATP, a deadly explosive.

According to Langhorne’s instructions, the video would be made under the guise of a scientific how-to guide, so it would technically remain within the terms of service for online video sites.

The Roanoke resident delegated video production to an ISIS member he met online.

Except the ISIS member Langhorne contacted, and eventually trusted, was a specialist with the FBI.

RELATED: $5 million reward offered in FBI search for 'most wanted terrorist'

Three days after the undercover operation began, text messages show Langhorne initially questioned whether the unidentified man worked for the FBI.

Langhorne texted a hypothetical story, where he called himself "Steve," and the video producer, "Bob."

"Next thing ya know, Steve gets a knock at this door… Turns out Bob was an FBI field agent," Langhorne wrote. "Either you make the video and you prove you aren’t a fed, or… don’t make the video and prove you are a fed."

Records show the undercover agent would eventually create a video – except the chemical formulas produced an inert, harmless substance.

Langhorne uploaded the clip to the British video website BitChute, titling the tutorial, “TATP: HOW YOU LEARNED TO STOP WORRYING AND LOVE THE BOMB.”

He then tweeted after the upload, "It’s alarming to hear sirens in the distance now," and "interesting to see the effects of failed safety handling with explosives." 

Langhorne's Twitter account, @YoRHaJihadi (now suspended), featured an image of two individuals near a computer looking alarmed, both wearing shirts with FBI and NSA printed on them.

His criminal information shows once Langhorne established contact with the undercover agent, he then called the ATF.

Authorities said the purpose of the call was to ask about explosives licenses, inquire whether someone on a terror watch list could obtain such a license, and question what background checks were completed for ATF agents.

The FBI said it has known of Langhorne for five years, when he first made Facebook posts supporting ISIS in 2014.

Twitter cooperated with two search warrants to search Langhorne’s accounts, which ultimately revealed troubling interactions on the social media platform.

In one Twitter direct message, Langhorne wrote, "I don’t plan on blowing myself up at all… But the path I’ll be on will be dangerous and likely end in death."

Langhorne was moved Friday from federal custody in Virginia to a jail near Jacksonville, Fla. Authorities said he lived in St. Augustine when the investigation began, but relocated to Roanoke in early April.

RELATED: Montgomery County man charged with attempting to support ISIS

RELATED: A Virginia religious teacher sexually preyed on a female student, while spreading ISIS videos

Download the brand new WUSA9 app here.

Sign up for the Get Up DC newsletter: Your forecast. Your commute. Your news.