When Basit Javid Sheikh told his new Facebook friend, a Syrian nurse, that he wanted to travel from his home in North Carolina to Syria to fight with the opposition group Ahrar ash-Sham, “she” messaged him back and suggested he instead join the Al-Nusra Front, a rival group affiliated with al Qaeda.

When, in a subsequent conversation via Skype, a “trusted brother” who was actually an undercover FBI employee, “told Basit that he could help get him inside Al-Nusra. … Basit stated that he did not want to be one of those brothers who kept sitting at home,” according to court records.

Sheikh, who apparently had romantic feelings toward the nurse and even proposed marriage at one point, according to his attorney, eventually agreed to join Al-Nusra, purchased a plane ticket to Beirut and prepared for his journey to jihad. But after clearing security at Raleigh-Durham International Airport on Nov. 2, 2013, he was arrested and charged the next day with supporting a foreign terrorist organization.

Sheikh’s case and several other recent terrorism prosecutions shed light on the growing importance of social media in the battles unfolding in Syria and Iraq -- both as a recruiting tool for Islamic terrorist groups like ISIS and the Al-Nusra Front, and as a means for the FBI to pre-emptively nab the would-be jihadis.

But a review by NBC News of a dozen federal criminal cases related to the ongoing conflicts in the Middle East also raises questions about the FBI’s conduct in attempting to head off terrorist recruits and whether they incited them to actions they wouldn’t have otherwise taken.

It shows that undercover FBI agents or informants first identified or connected with the suspects via social media in at least four cases, using fake social media identities to engage them and, in Sheikh’s case, possibly engaging in “catfishing” by luring him into a personal relationship with a phony online persona. Agents also created a “false-flag” or “honeypot” Facebook page to help snare him.

Basit Javed Sheikh of Cary, North Carolina, is charged with one count of attempting to provide material support to a foreign terrorist organization. Police handout

The number of cases in which social media was a key investigative tool for the bureau could be higher, but key parts of the proceedings in several cases have been sealed by federal judges out of concerns that revealing them could harm national security.

And in some cases, descriptions in the criminal complaints are not specific as to what kind of online contact investigators made with the subject. For example, in the case against Abdella Ahmad Tounisi, an 18-year-old from Aurora, Illinois, accused of trying to join the Al-Nusra Front, court documents state that, “During the investigation, the FBI published a webpage that purported to recruit individuals to travel to Syria and join Jabhat al-Nusra (Arabic for the Al-Nusra Front),” but offer no additional information about the nature of the site.

“ISIS has … been able to expand their reach far beyond the traditional jihadi recruitment pool to a much wider audience -- including English-speaking Western nationals."

Evan Kohlmann, a partner with the global security firm Flashpoint Intelligence and an NBC News consultant on counterterrorism, said law enforcement is rightly concerned that American Muslims who join groups like ISIS and Al-Nusra could one day return to the U.S. as battle-hardened terrorists and is merely updating techniques it has used since the early days of the Internet to engage the enemy on services such as Twitter, Facebook and YouTube.

“In contrast to past social media efforts by al Qaeda, which have focused on password-protected Arabic-language web forums that are focused on jihadi affairs, ISIS has made effective use of major commercial social media platforms, such as Twitter, Facebook, YouTube, and even VKontakte in Russia," he said. "As a result, they have been able to expand their reach far beyond the traditional jihadi recruitment pool to a much wider audience -- including English-speaking Western nationals."

Suleimanagich, Kenny (206446232)

Click here to explore interactive map with details of the cases of the dozen U.S. residents -- 11 of them Americans -- accused of trying to join the fight in Iraq or Syria as well as the three Americans confirmed to have died in the fighting.

Michael Sheehan, former assistant secretary of defense for special operations and now chairman of the Combatting Terrorist Center at the U.S. Military Academy at West Point, said ISIS is particularly effective in getting its message out, having mounted “the best and most sophisticated (propaganda operation) by any terrorist organization in the history of modern terrorism," he said.

But civil liberties advocates and other critics argue the FBI at times goes too far to reel in American Muslims, most of them young, who are sympathetic to the Islamic extremist cause.

Heather Williams, a federal defender representing Nicholas Teausant, one of the four cases identified by NBC News where social media played a key role in the investigation, says her client is “a lonely, mentally ill young man with a tremendous desire to be liked,” which made him susceptible to a paid FBI informant’s online encouragement.

“At the same time Nick Teausant was a supposed jihadist … he also fancied himself a second-degree Freemason and a proud member of the Army National Guard,” she wrote in court documents of the 20-year-old community college student accused of trying to join ISIS in Syria, who she said had been “psychiatrically evaluated at the jail and placed on Risperdal” -- a prescription drug used in the treatment of schizophrenia and bipolar disease. “The difference between these groups is that the Freemasons didn't invite him to their meetings, and the National Guard never put him on a bus to basic training. The paid informant did put him on a train to Canada. That is the crime in this case.”

The NBC News’ review of the recent cases revealed a pattern: Suspects began posting on Facebook or other social media expressing support for or seeking contact with one of the Islamic groups fighting in Iraq and Syria and were then engaged by informants or undercover FBI agents. Their new online friends offered to help them, supplying supposed contacts in the Mideast, encouraging them to purchase plane tickets and, in at least one case, promising financial assistance upon arrival. Then, after offering the suspects a chance to back out – a tactic that Karen Greenberg, director of the Center on National Security at Fordham Law School in New York City, said is intended to weaken any legal defense arguing entrapment – they arrested them at airports or U.S. border crossings as they sought to begin their journeys.

The accompanying interactive map has details on the dozen cases examined by NBC News, as well as on three Americans who succeeded in reaching Syria or Iraq and are known to have died in the fighting there. U.S. officials say they believe approximately 100 Americans have either have gone or attempted to go to Syria to join one of the many groups fighting to overthrow President Bashar Assad.

The Justice Department and FBI declined a request for comment from NBC News on the social media counterterrorism operations, but U.S. Attorney General Eric Holder, in a speech in Norway in July, described FBI undercover operations aimed at intercepting would-be jihadis as being “conducted with extraordinary care and precision, ensuring that law enforcement officials are accountable for the steps they take – and that suspects are neither entrapped nor denied legal protections.”

According to one U.S. government source, also speaking on condition of anonymity, in addition to denying ISIS and other groups recruits, such operations make "ISIS wannabes" nervous about communicating with apparently like-minded strangers over social media.

Greenberg said that may in fact be the primary goal of the effort.

"I think these cases demonstrate that law enforcement has made a serious determination that they think they can stop the flow of foreign fighters, " she said. "And the way to do that is to send a very clear message: … 'Don't go there in any way, don't go there in thought or expression, don't even toy with the idea of becoming foreign fighters.'"

Nicholas Teausant was arrested for allegedly attempting to join ISIS. KNBC

The case of Teausant, of Acampo, California, offers the most detail about the FBI’s use of social media, describing his postings on several sites, including Instagram, ask.fm and Facebook, as well as his subsequent conversations with the FBI informant.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Teausant was arrested in March in Washington state at the Canadian border as he was allegedly on his way to join ISIS in Syria and subsequently charged with attempting to provide material support to a foreign terrorist organization. He has pleaded not guilty and told the Sacramento Bee in a jailhouse interview that the informant encouraged him to fulfill what he described as "idle boasts."

According to court records, the FBI's interest in Teausant dates to early 2013, when he posted on Instagram an image of himself standing in front of a U.S. Army Corps of Engineers sign in Sacramento. He followed that posting with one noting, "don't get me wrong I despise america and want its down fall but yeah haha. Lol I been part of the army for two years now and I would love to join Allah's army but I don't even know how to start." (In fact, Teausant was never in the Army.)

By August, according to an affidavit from an FBI agent, he put out feelers on Instagram for the "lone Mujahid pocket book," a compilation of materials from al Qaeda's Inspire Magazine that the agent described as a “how-to guide for becoming a lone wolf terrorist."

Not long afterward, the paid FBI informant, referred to as a "confidential human source" or CHS, made "direct and electronic contact with Teausant," based on those postings, according to the affidavit. The FBI also utilized an undercover agent, it said.

In a series of subsequent conversations, both in person and by text, Teausant expressed his desire to fight, specifically with ISIS, and said he wanted to see the U.S. "tumble and fall in the wake of a civil war." He also texted about a "camping trip" where he and others discussed bombing the Los Angeles subway and even suggested "he wanted to bomb his daughter's day-care because it was at a "zionist reform church," according to the complaint.

Teausant at one point began to get nervous about his use of social media, according to the complaint. On New Year's Day 2014, he texted a link to an article to the informant about a terrorism defendant who had been contacted surreptitiously by the FBI via Facebook, and expressed concern about "the brothers he was meeting with because he had met them through Facebook as well."

“In reality, Nick couldn’t provide material support to a pup tent.”

Ultimately, with the aid of the informant and undercover agent --and after being asked if he wanted to "consider his course” -- Teusant made plans for the trip to Syria and was arrested.

Williams, Teausant’s lawyer, said she will argue that Teausant "wouldn’t have acted" on his postings without the encouragement of the informant and undercover agent and wrote that while her client is charged with providing material support for a terrorist organization, “In reality, Nick couldn’t provide material support to a pup tent.”

“He is 20 years old,” she wrote in a motion requesting his release on bail pending his trial. “He is a student at San Joaquin Delta Community College. He does not own car and has no driver’s license. He has no criminal history. He has a GED (General Education Diploma). Although he attempted to join the U.S. National Guard, it is in the process of discharging him because he could not meet the minimum academic requirement of 15 credits.”

He also couldn’t even remember the name of the group he allegedly sought to join, she wrote, stating that at one point Teausant said he wanted to join the “Islamic state of, um, crap … I forget.”

The case against Basit Javid Sheikh in Raleigh, North Carolina, raises questions of a different nature.

After Sheikh drew the FBI’s interest by posting material supporting the Islamic Syrian opposition groups on his Facebook page,the FBI's confidential informant posed as a Syrian nurse and "used a Facebook page which promoted the ideology of Islamic extremism" to contact the suspect, according to a criminal complaint. The page was not further described in the complaint, but the Raleigh News-Observer described it as an "FBI-run Facebook page disguised as a forum for extreme Muslim views."

Sheikh, a 29-year-old legal resident of the U.S. born in Pakistan, commented on the informant's postings on the Facebook page, then engaged in direct messaging with the informant, according to the complaint. He said he had previously joined the Free Syrian Army, the main U.S.-supported Syrian opposition group, but found it "nationalist" rather than Islamic. He told the informant he wanted to return to Syria and fight with Ahrar ash-Sham, an Islamic anti-Assad group that, while it has been reported to have a few former al Qaeda members among its leadership, is not labeled a terrorist organization by the United States.

"In actuality, this 'trusted brother' was an FBI Online Covert Employee (OCE)."

The informant, however, suggested that Sheikh instead join the Al-Nusra Front, an al Qaeda affiliate that is designated as a terrorist organization by the U.S. government, according to the complaint. She even provided Sheikh with contact information for a supposed Al-Nusra agent.

"The CHS described this person as a 'trusted brother' with JAN (Jabhat al-Nusra) who spoke English well," according to the criminal complaint. The informant informed Sheikh that he could "email this brother to make first contact."

"In actuality, this 'trusted brother' was an FBI Online Covert Employee (OCE)," the complaint said.

In a subsequent conversation via Skype, recorded by the FBI, the undercover agent also encouraged Sheikh to join Al-Nusra.

"The OCE told Basit that he could help get him inside (Al-Nusra), and warned him that he needed to understand how difficult it was for the brothers and how Basit could get shahada (martyrdom)," according to the complaint.

Related

Jihad Interrupted: Feds Grab ISIS 'Wannabes' Before They Reach Syria

ISIS Imitators Discussed Attacks on U.S. Targets in Canada

Exclusive: American Extremist Reveals His Quest to Join ISIS

It is unclear whether the informant was in fact a woman. Sheikh's lawyers have assailed the FBI informant’s use of a female persona, arguing in a detention hearing last December that Sheikh thought the relationship was "romantic" and at one point had proposed marriage.

FBI Special Agent Jason Maslow responded that he wasn’t sure whether Sheikh had proposed, adding that the informant had not accepted any proposal of marriage from the defendant as far as he knew.

The government objected to revealing the informant’s actual identity on grounds of national security and informant’s privilege. The court sustained the objection on the latter grounds, and noted that there was no evidence in the record as to the informant’s actual identity, gender, profession, location or affiliation.

Like Teausant, Sheikh also feared being tripped up by this social media postings, at one point expressing “concern that he may be monitored," according to the complaint.

The FBI employee turned those concerns back on him, suggesting that his inability to find the funds for his plane ticket suggested that Sheikh was actually an undercover agent trying to trap him, it said.

Three weeks later, on Nov. 2, 2013, after allegedly telling the FBI employee how badly he wanted to fight, Sheikh bought the ticket and, after going through security at Raleigh-Durham Airport, was arrested.

Though Sheikh has been in custody for almost a year, he has not yet entered a plea. It is not clear why, as much of the case against him has been sealed on national security grounds and a spokeswoman for the Federal Defender’s Office in Raleigh said a local court order prohibits its lawyers from discussing cases with the media.

Sheikh is scheduled to be arraigned on Oct. 29.

Sheikh’s defense also may argue that he had been having mental problems at the time of his arrest. His mother testified at a hearing in November that he “likely suffered from anxiety and depression, needed psychiatric help, lacked a job and spent all of his time on the Internet,” Britain’s Guardian newspaper reported.

Both Sheikh and Teausant face up to 15 years in prison and fines of $250,000 if they are convicted of the charges against them.

The other cases in which social media played a key investigative role are those of Sinh Vinh Ngo Nguyen, 25, of Garden Grove, California, and Donald Ray Morgan, 44, of Landis, North Carolina.

Nguyen, whose public defender also described her client as having a personality disorder "on the spectrum of schizophrenia," sought to make contact with al Qaeda officials on Facebook and other social media, but instead drew the attention of an undercover FBI agent who presented himself as a recruiter for the terrorist group. Nguyen pleaded guilty under a plea agreement to one count of attempting to assist a known terrorist organization and was sentenced in in December 2013 to 13 years in prison.

Morgan was arrested on arrival at John F. Kennedy International Airport on Aug. 2, 2014, and charged with being a felon in possession of a firearm. He has pleaded not guilty. Court documents indicate that Morgan, a former bodybuilder and convert to Islam, came to the attention of federal authorities for his Twitter accounts using the alias “Abu Omar al Amreeki” in which he pledged allegiance to ISIS leader Abu Bakr al-Baghdadi and expressed interest in traveling to Syria or Iraq to join the terror group.

While defense attorneys in all four cases may argue that the FBI actions amounted to entrapment -- the act of tricking someone into committing a crime so that they can be arrested -- Greenberg, the director of the Fordham University security center, said such a defense has never succeeded in the 10 times it has been raised in U.S. terrorism cases since 2001.

She also said that in some of these cases, the federal government appears to be making examples of individuals who had little ability to join the conflicts in Iraq and Syria on their own.

"I think the message being sent is more important than the specific cases, more important than stopping them," she said.

Kohlmann, often a U.S. government witness in terrorism cases, said that sending a message to potential terrorist recruits is indeed important.

"ISIS recruits are more likely to reach out in the online universe seeking advice on how to reach the land of jihad than to consult the guidance of a traditional cleric or local community leader," he said. "FBI and other law enforcement officials hope that by infiltrating that universe and creating honeypots to draw in and capture potential ISIS recruits, they can help sow doubts in the minds of would-be jihadists in the overall reliability of the Internet as a medium for recruitment."

Follow NBC News Investigations on Twitter and Facebook.

The Washington Post reported on Oct. 7 that Justice Department plans to review federal law enforcement practices on creating fake Facebook pages in light of an incident, first reported by Buzzfeed, in which a federal agent used a real woman’s photographs and other personal information to create a fake Facebook account as part of a drug investigation.

But Justice Department officials tell NBC News that the review does not extend to its counterterrorism operations.

Pete Williams contributed to this report.