The veteran FBI agent and a local sheriff's deputy took no chances when they got a credible tip about a potential terrorist.
In a joint operation, they ran his name through a maze of federal criminal and terrorism databases and scrutinized his telephone records for suspicious contacts.
Without a warrant, they couldn't read his emails or listen to his calls. But they watched him from unmarked vehicles to track his daily routine and to see whom he met.
They deployed two confidential informants more than a dozen times to secretly record his conversations. They interviewed him twice and convinced him to provide a written statement — in which he admitted he previously had lied to agents.
In the end, after a counter-terrorism investigation that stretched from May 2013 to March 2014, the agent and his supervisor concluded that Omar Mateen was not a threat and closed the case.
Just over two years later, on June 12, the 29-year-old security guard strode into a packed gay nightclub in Orlando, Fla., and massacred 49 people and wounded dozens more in the worst mass shooting in U.S. history. He pledged allegiance to Islamic State before he was killed by police.
Since then, senior FBI officials have scoured the 3-inch case file from the 2013-2014 investigation to see whether agents had missed clues to his murderous intentions or apparent radicalization.
"We don't have a crystal ball, unfortunately," said a senior FBI official, speaking on condition of anonymity because the case remains under investigation. "We went right up to the edge of what we could do legally, and there was just nothing there."
In interviews with The Times, senior FBI officials provided new details of their early focus on Mateen and some of the lessons they have drawn as the FBI assesses and tracks more than 1,000 suspected extremists across the country.
The 10-month probe remains one of the enduring and frustrating mysteries of Mateen's deadly rampage at the Pulse nightclub.
The day after the attack, FBI Director James B. Comey broadly outlined the 2013-2014 investigation to reporters. He staunchly defended the bureau, saying he didn't "see anything in reviewing our work that our agents should have done differently."
Still, the post-massacre review uncovered a surprising gap.
The senior FBI official said agents could have been more aggressive in accessing Mateen's social media accounts, including Facebook. But the official noted that in 2013 such checks of online posts were not yet routine or "part of our investigative DNA."
Today, one of an agent's first investigative steps is to check a suspect's social media, especially in light of the Islamic State's aggressive recruitment efforts on Facebook, Twitter and other digital networks and apps.
In Mateen's case, it wouldn't have changed the outcome. The post-shooting review determined his social media accounts contained no ties to terrorist groups.
He did not post radical statements until the night of the shooting, and then just to a group of friends, not the public, according to a second FBI official, who also spoke on condition of anonymity to describe the investigation.
After the shooting, the FBI determined that Mateen's laptop computer had been used in recent years to view extremist videos online, including grisly beheadings. It also was used to seek information on Islamic State.
Watching offensive videos is not a crime, however, and federal agents did not have the probable cause necessary to obtain a search warrant in 2013 to even learn that much, FBI officials said.
"This was not a baseline shake-the-bushes ... kind of investigation," said Patrick Skinner, a former CIA case officer and director of special projects for the Soufan Group, a security firm based in New York.
"They looked and didn't find anything," he added. "That doesn't mean that the investigation was bad, or wrong. It shows how difficult it is to get in front of these things."
The FBI began investigating Mateen in May 2013 after the St. Lucie County Sheriff's Office reported that the American-born son of Afghan immigrants might pose a threat.
Mateen was a private security guard at the county courthouse, where the Sheriff's Office oversaw security. Co-workers had warned that Mateen had claimed connections to the terrorist groups Al Qaeda and Hezbollah, and that he wanted to die as a martyr, the Sheriff's Office told the FBI.
The bureau gets tens of thousands of tips each year from people reporting suspicious activity. Most are discarded after rudimentary investigation.
The FBI took the concerns about Mateen seriously because the report came from another law enforcement agency, because he had access to firearms and because he worked in a public building.
The bureau assigned an FBI agent with at least 10 years of service in the bureau in its Fort Pierce office, and a sheriff's deputy on the local Joint Terrorism Task Force, to investigate.
The agent was skeptical that Mateen posed a real risk. When Mateen said he was a member of Hezbollah, a Shiite group, and had family ties to Al Qaeda, a Sunni group, it was clear he didn't know or care they were bitter rivals, the senior FBI official said.
Even so, the agent realized that people becoming radicalized don't always understand the fine points of jihadist politics, two FBI officials said.
The lead agent opened a preliminary investigation. Under Justice Department guidelines, such an inquiry can run six months and be extended for six more.
The designation permitted the investigators to use a variety of tools — searching databases, obtaining cellphone records and conducting surveillance, for example.
More invasive techniques — such as seeking a warrant from the secretive Foreign Intelligence Surveillance Court to read email and to eavesdrop on phone calls — are reserved for full investigations and then only if the FBI can convince the court there is probable cause of a crime.
While the probe was underway, the FBI added Mateen's name to the "selectee list" on the bureau's Terrorist Screening Database, also known as the Terrorist Watchlist.
It would ensure he got special screening at airports and that an FBI agent would be alerted if he tried to buy a gun or was stopped by police. About 1,700 Americans are on the selectee list.
The first search — checking Mateen's name against criminal and terrorism databases — came up dry. After obtaining his call records from his phone company, the team also ran his number and his contacts through terrorism databases. Again, they found nothing suspicious.
During the next few months, they conducted surveillance of Mateen as he went to work and met friends, but they saw nothing unusual.
They had two confidential informants meet repeatedly with Mateen over the 10 months to see whether he might say something incriminating while they were recording him. The FBI routinely uses informants to gather evidence in terrorism cases, and often relies on them to help set up sting operations.
FBI officials refused to identify the informants or say where they met with Mateen, although a senior FBI official said they had "nothing to with the mosque," the Islamic Center of Fort Pearce, that Mateen attended.
Mateen admitted to the informants that he had claimed terrorist ties at work. But he said he had been joking, trying to scare co-workers who had bullied him for being a Muslim.
In September 2013, FBI officials said, the lead agent and deputy sheriff interviewed Mateen. He initially denied having made any radical statements.
The investigators returned a month later and accused Mateen of lying. This time, he admitted in a written statement that he had not been truthful, and had in fact claimed terrorist ties because co-workers had teased him for being Muslim.
It was true: When FBI agents interviewed Mateen's co-workers, they admitted they had teased him about his religion.
"They were being jerks," said a U.S. counter-terrorism official who also spoke on condition of anonymity. "He wasn't making that up. He wasn't paranoid."
Concerned it might have missed something, the FBI extended the investigation in the fall of 2013. When they closed it in March 2014, they removed Mateen's name from the Terrorist Watchlist.
The FBI typically only charges someone with lying to agents if there is an underlying crime. In this case, officials said, they had none.
That summer, the FBI came knocking again. The focus this time was Moner Mohammad Abussalha, a former member of Mateen's mosque who had become a suicide bomber in Syria. Agents scrambled to learn whether he had associates in Florida.
A member of the same mosque told agents that Mateen had mentioned watching online sermons by Anwar Awlaki, the influential American-born Al Qaeda cleric who was killed by a CIA drone in 2011 in Yemen, two FBI officials said.
The man said he didn't think Mateen was dangerous, but suggested the FBI keep an eye on him.
When the FBI interviewed Mateen — for his third time — in July, he said he recognized Abussalha from the mosque but was not an acquaintance. When pressed about the radical videos, the security guard denied having watched them.
And with that, the FBI moved on to other potential threats.