A few days later, however, that plan somehow changed. Ammar arrived at the mosque one evening at the time of isha, the last of the five daily prayers. He found his generally coolheaded brother ashen and distraught. ‘‘He was in such a mental state, so devastated that he couldn’t even lead the prayer,’’ Ammar recalled. ‘‘He was angry, upset, sad, maybe confused.’’ He put off Ammar’s questions until the next day, when he took him to a room where they could talk privately and asked him to take the battery out of his cellphone, doing the same himself. ‘‘He said, ‘Something happened last night that made me reconsider my stay here in the States,’ ’’ Ammar recalled. ‘‘ ‘I was told that the F.B.I. has a file on me, and this file could destroy my life. I’m now rethinking my options, and one of them might be as drastic as leaving the States.’ ’’

Awlaki did not tell his admiring younger brother what was in the file. But a document from the 9/11 Commission records at the National Archives, declassified at my request, shows that a few days after Ammar’s arrival, the manager of an escort service called Awlaki to warn him that he had been interviewed by Wade Ammerman, an F.B.I. agent, who had asked about the imam’s visits to prostitutes. It was clear from Ammerman’s questions that the F.B.I. knew everything.

Awlaki’s panic, his sudden agitation about the course of his life, does not appear to have been triggered by American hostility to Muslims. Rather, he seems to have realized that his own un-­Islamic behavior had put his career success and family comity at risk. If the bureau charged him, or leaked the files, he might instantly lose the moral authority he brought to public arguments over the war in Afghanistan or the dubious roundup of Muslim men. If the F.B.I. chose instead to threaten exposure to coerce his cooperation, that might be even worse. Within a few days, he was gone, and he would never live in the United States again.

Despite the danger that he perceived from the prostitution dossier, Awlaki did not immediately give up on the possibility of resuming his American life. Awlaki was hardly in a position to tell his family about the menacing F.B.I. file, and his father pressured him to return to Washington and resume work on his Ph.D. Awlaki returned for one visit, in October 2002, but uncertain of the F.B.I.’s intentions, he did not dare risk staying. In fact, though he had no way of knowing it, F.B.I. memos from 2002 show that officials were exploring the possibility of charging Awlaki with a prostitution-related offense. A year after his visit, in the fall of 2003, he astonished F.B.I. agents by calling the bureau’s Washington field office out of the blue, expressing a desire to meet in London or Sana to clear up any suspicions, possibly as a prelude to returning to the United States. He mentioned media reports tying him to 9/11 because some hijackers had visited his mosques, which he called ‘‘absurd’’; presumably he also wanted to find out whether the bureau planned to act on the prostitution file. But the F.B.I. treated the issue as a low priority, and when Awlaki stopped answering emails, plans to meet in London fell through, records show. As late as 2004, when Awlaki returned to Yemen for what would prove to be the remainder of his life, he would sometimes suggest to family members that he might still move back to the United States. ‘‘He would always say, ‘Thank God I’m an American citizen and I have a second home to go back to if things go wrong in Yemen,’ ’’ his uncle, Saleh bin Fareed al-Awlaki, told me.

It is a tantalizing period, hinting at an alternate history. What if the F.B.I., recognizing Awlaki’s influence and value as a mediator with the Muslim community, had assured him that there was no plan to use the prostitution evidence to charge or embarrass him? What if he had resumed his life in Washington and continued to grow into an important public figure? Might he have become a responsible leader, a voice in the debates over the wars in Muslim countries, the wisdom of drone strikes, the fate of Guantánamo? Might he never have joined Al Qaeda? The contemporary history of terrorism, not to mention his playlist on YouTube, could have unspooled quite differently.

Instead, Awlaki’s ambition took a new and more militant path. At first subtly in 2003, while in Britain, and more clearly after 2005, his rhetoric became increasingly ferocious, his embrace of violence more open. After moving on to Yemen, he was arrested in 2006 and held for 18 months without charges at least in part as a result of American pressure. Not long after his release at the end of 2007, angered by the Yemeni surveillance teams constantly following him around Sana, he would depart for his family’s ancestral home in Shabwah province, also the hideout for Al Qaeda in the Arabian Peninsula. Within months he would be part of the group and, soon after that, deeply involved in plotting attacks on America.