One of them was D, who was just 15 years old when she was kidnapped alongside other Yazidi women and girls from her village at the foot of Mount Sinjar a few weeks after the declaration of the caliphate. Interviewed after her escape, she asked to be identified by only her first initial because of the stigma of rape. She described how the women and girls were transported to a building in Raqqa, which acted as a viewing gallery for the men wishing to enslave them.

The first man to come in was al-Baghdadi, she said, information that was confirmed by two other girls who were held at the same facility.

“I noticed right away that he was important — everybody stood up when he walked in,” D said.

She and the other girls he chose were moved from house to house, eventually ending up in the same villa as Kayla Mueller, a 26-year-old American aid worker from Prescott, Ariz. All of them were taken out and raped by al-Baghdadi, including Ms. Mueller, who returned to their shared room sobbing unconsolably, according to the account of survivors that was confirmed by American officials and Ms. Mueller’s mother.

Al-Baghdadi took pleasure in brutality, the women held captive said.

One day in August 2014, D was summoned to see him. Fearing she was about to be raped again, she was surprised when al-Baghdadi took her into the living room, not the bedroom, and asked her to sit next to him on a couch.

“He had a big, black laptop,” she said, recalling how he hit “play” on a video on the screen. It showed the execution of an American journalist, James Foley.

“He told us, ‘We killed this man today,’” she said. “He was laughing at our reaction.”

Some who knew al-Baghdadi the longest wondered if it was his very nature that accounted for his ability to evade capture for so long, and not just his extreme security measures.