"If there's no more suspicion, then you've pretty much run out of gas and you have to close the investigation," said James McJunkin, a former head of the FBI's counterterrorism division, who left the agency in 2012.
Even when a suspect seems hellbent on committing a deadly crime, agents must give them several opportunities to back out before an arrest.
The FBI has increasingly used what defense lawyers call undercover stings in suspected terrorist cases in recent years. Agents and informants pose as radicals, friends, bomb makers and gun dealers to befriend and track potential terrorists.
But stings are controversial. Supporters celebrate their successes. Critics cry "entrapment."
It's still unclear how far the FBI pushed to see whether Mateen, 29, of Fort Pierce, was on a path to terrorism before closing their investigations and removing him from the watch list.
The rules were followed, authorities say, both times they investigated Mateen before the shooting.
The 2013 inquiry began when Mateen worked as a security guard at the St. Lucie County Courthouse. Co-workers told their boss he made inflammatory comments about women, gays and Jews and claimed to have ties to al-Qaida and Hezbollah. He also talked about martyring himself if agents raided his apartment, they said. Sheriff Ken Mascara referred the concerns to the FBI.
The feds interviewed Mateen, put him on the watch list, followed him and sent at least one informant to try to figure out whether he had specific plans or was full of hot air. They also interviewed him and he admitted making inflammatory statements but said they were in response to colleagues teasing him about his Muslim faith.
He was dropped from the terror watch list.
Mateen was back in their sights in 2014. This time because he attended the same Fort Pierce mosque as the first American to carry out a suicide attack in Syria. Agents found that Mateen's contact with Moner Mohammad Abu-Salha was minimal and that investigation was also closed.
Two years later, Mateen, armed with a semiautomatic rifle and pistol, killed 49 people and injured 53 more at a gay nightclub in Orlando. Experts say Mateen would have been allowed to purchase the weapons even if he had remained on the watch list.
FBI Director James Comey has said the agency will continue examining its handling of Mateen but said the initial examination suggests agents acted appropriately.
The agency seems to have followed its protocol on handling the tips about Mateen, said Michael German, a former FBI undercover agent.
"FBI agents aren't given a crystal ball when they get their guns and their badges. They can't predict the future," said German, who now specializes in national security research at New York University's Brennan Center for Justice.
The "see something, say something" strategy that urges the public to report even minor suspicions to authorities is flooding agents with "false alarms," German said. But each one must be vetted and that takes time, manpower and money, all of which are in short supply, German said. He thinks the system needs to be streamlined to allow agents to focus only on the most likely candidates.
Investigators in Broward and Miami-Dade apparently had more evidence in late March when they launched an undercover sting on Medina. He reportedly had said he wanted to "spray bullets" inside a crowded Aventura synagogue. Agents said he had easy access to a friend's AK-47.
A former Pentecostal Christian who converted to Islam four years before his arrest, Medina also calls himself James Muhammad.
Though Medina, 40, was unemployed and squatting in an abandoned building, he also had a history of mental health problems and arrests. His lawyer argued that he was not a fair target for a sting and agents "could have gotten Mr. Medina to do anything."
Medina expressed hateful views about Jewish people, according to agents, but he had no known link to terrorist organizations. It was a confidential source who introduced the idea of claiming ISIS or another terror group was involved.
Medina's stated desire to carry out a specific attack on a synagogue was likely a deciding factor that made him a candidate for a sting, said former agents and lawyers familiar with these kinds of cases.
Late in the Medina investigation, an undercover FBI agent also began meeting with him. Transcripts of undercover recordings in the case show the agent repeatedly asked him why he wanted to do it, questioned his motives and tried to discourage him.
"You're sure this is something you want to do man?" the undercover agent asked.
"When you put a bomb in a place like this, are you OK, you've made peace with Allah that you're fine with killing women and children and everything else?" the agent asked another time.
Medina insisted, each time, he wanted to go ahead with the deadly plan.
Medina was arrested about four weeks into the operation, carrying what he thought was a genuine bomb. Prosecutors said he intended to set it off at the synagogue during the Passover holiday.
An undercover source had steered Medina away from the AK-47 attack and instead introduced the idea of detonating an explosive device. They said they did it so that Medina needed them to make and supply the bomb.
U.S. Magistrate Judge Andrea Simonton said in court that steering Medina to use a hoax bomb was "probably a very wise investigative move" because it gave agents greater control over Medina's timing and actions.
The similarity between what authorities say Medina initially planned and what Mateen actually did — using a rifle to shoot dozens of people inside a building — is uncanny.
"It's the counterterrorism equivalent of figuring out who's going to rob a liquor store tomorrow night," said McJunkin, the former FBI counterterrorism said. "Just because the guy who's going to rob the liquor store tomorrow has been arrested by the police department three or five times in the last three years, should the police department know because of those arrests that he's going to rob a liquor store tomorrow?
"Impossible," McJunkin said.
Jurors sometimes wrestle with the nuances of undercover stings, as they did in the case of the so-called "Liberty City Seven." In that case, seven men from the Miami area were arrested with the help of an undercover FBI informant posing as a terrorist.
It took three trials, between 2007 and 2009, before five of the seven were convicted of plotting to blow up a Chicago skyscraper and bomb federal law enforcement offices in several cities.
Jurors deadlocked in the first two trials and two of the men were found not guilty along the way.
Albert Levin, a Miami defense attorney who represented one of the Liberty City Seven, said there was no realistic threat and the defense argued the men were trying to get money from the informant: "They were a bunch of guys who were talking a lot of nonsense. The feds were using a confidential informant and I guess they thought they were making a pre-emptive strike."
Ronald Chapman, a South Florida lawyer who represented one of two Oakland Park brothers who eventually pleaded guilty to planning a terrorist bombing in New York City, said federal prosecutors and agents still have a lot of leeway.
"Trying to prove entrapment … is almost impossible. The authorities have a lot of discretion. If there is someone who is remotely interested in committing a crime, the feds seem to go after them pretty hard," Chapman said.
But the decision to go ahead and prosecute terrorism suspects is still not made lightly, he said.
On high-profile cases like these, "they are going to look very hard at the strength of the allegation, the strength of their case," Chapman said. "They are going to look very closely at whether they have a strong enough case to win. The last thing they want to do is lose."
If you are facing criminal charges in Florida or have any questions regarding criminal defense, contact Ron Chapman at 561-832-4348. You can also connect with his West Palm Beach Law Office online. Ron Chapman is an experienced defense attorney and am dedicated to defending your rights. Call today for a free consultation!