The people who know Dylann Storm Roof — the people who watched his progression from a sweet child to a disturbed man — are struggling with guilt. How could they have missed the signs? Could they have done something to prevent the deaths of nine innocents at the Emanuel African Methodist Episcopal Church?

How did it all happen?

Roof himself offers no answers. He sits in North Charleston's Sheriff Al Cannon Detention Center, charged with the murders, his $1 million bail far beyond reach.

But talk to his friends and family, and a portrait emerges of a troubled and confused 21-year-old, often drunk and occasionally threatening violence as he alternated between partying with black friends and spouting white power slogans to white friends. Court documents and nearly two dozen interviews show Roof's early childhood was troubled and confused as well, as he grew up in an unstable, broken home amid allegations of marital abuse and infidelity.

He apparently fell under the thrall of racist websites. But how and why are questions that remain unanswered.

As a 4-year-old, "He was so sweet and bright," recalls Patricia Hastings, who was once his step-grandmother.

Seventeen years later, she is among many who are trying to figure out what happened to Dylann Roof.

___

There is little dispute his childhood was difficult.

Franklin Bennett Roof was a 25-year-old carpenter working for a home construction company, when he met 29-year-old Amelia "Amy" Cowles, a recent divorcee, barely 5-feet tall with blonde hair to her ankles. He was the son of a prominent Columbia attorney; she was a bartender at the Silver Fox. They married in 1988 and had a daughter, Amber, four months later.

They separated in 1990, and divorced a year later. A few years later they briefly reconciled, but split again before Dylann was born on April 3, 1994.

Four years later, Franklin Roof married Paige Hastings.

In an affidavit filed in her 2009 divorce, Paige said she became a surrogate mother for the children: "I raised his kids from a very young age, took them to all of their activities."

Patricia Hastings said her daughter loved Dylann and Amber "unconditionally as her own." She said Amy Roof would leave them in Paige's care with little notice, even though Paige had her own new baby, their half-sister Morgan.

Paige cut Dylann's hair in the bowl cut he still wears; she took Amber to college orientation because "both parents were unavailable," Paige's friend Leslie McArver wrote in an affidavit.

As he grew, Dylann exhibited obsessive compulsive behavior, Hastings said. He would obsess over germs, and insisted on having his hair cut in that same style, Hastings said.

Still, he played video games, interacted with the family, attended church and Bible camp.

But things grew stressful at home. Money was a problem so Paige took a part time job. Franklin Roof was often out of town.

Franklin Roof was verbally abusive, Paige's friend Carol Elliott wrote in an affidavit.

After Paige filed for divorce, Franklin Roof hired a private investigator to shadow her, revealing she was having an affair, according to the court documents.

The divorce was granted 2009. Hastings recalls that her daughter told her she felt guilty leaving Dylann.

___

Roof began having trouble in school. He failed the ninth grade twice, then dropped out for good in 2010.

People around him worried about his lack of direction. He was spending too much time in his room in front of the computer. They pushed him to get a job, but he was unhappy, his friends said.

Over the past year, Roof became increasingly unhinged.

In February, worried employees at a Columbia shopping mall called the police when Roof, dressed in black, asked them suspicious questions about when stores closed and when they left for the night, according to court records. He was arrested on a misdemeanor charge of possessing the drug Suboxone.

In March, a police officer searched his car and found six empty 40-round magazines for an AR-15 assault rifle, according to a police report. Roof said he was saving up to buy an AR-15, the report said.

In April, he was arrested again on a charge of trespassing at the mall, where he'd been banned.

He had become a recluse. He never responded to an invitation to Amber's wedding — which had been planned for last weekend but was postponed after the massacre. He also appears to have begun a journey into the world of Internet hate sites, according to the Southern Poverty Law Center, which tracks those sites.

"If you don't have much of a social life in the real world, this is a way for you to interact with other individuals and be affirmed and encouraged," said Keegan Hanks, of the Southern Poverty Law Center.

Roof appeared to be "AryanBlood1488," who began posting on the white supremacist site the Daily Stormer in August, Hanks said. Over several months, "AryanBlood1488" described how he typed "black on white crime" into a Google search, found the Council of Conservative Citizens site and descended into radicalism from there.

Kyle Rogers, a member of the Council of Conservative Citizens who lives in Summerville, South Carolina, denied Roof had any direct dealings with the group.

On Feb. 9, according to Internet records, someone using Roof's name, address and phone number registered a new website. On it, were photos of Roof at a Confederate cemetery, brandishing a gun, burning the American flag and spitting on it. The site also contained a manifesto explaining an indoctrination into radical racism.

On his 21st birthday in April, Roof bought himself a present: a .45-caliber Glock semi-automatic handgun with a high-point laser for accuracy.

___

Paige refused to talk to AP, as did Franklin and Amy Roof.

Mann had barely seen her former stepson since her nasty divorce. But last month, when she went to pick up her daughter at her ex-husband's house, he was there.

According to Patricia Hastings, recounting recent conversations with her daughter, Roof was quieter than he used to be; he looked distant, lost. He was no longer the sweet blond kid she helped raise for nearly a decade. As she was getting ready to leave, Roof, not one for affection, hugged her tight.

"It was like he was saying goodbye," Hastings said.

The next time Mann saw him, it was on television as the man accused of the killings.

Roof's friend Joseph Meek said he too is replaying, reinterpreting, his memories of Roof over the last months.

"I just wish he would have talked to me. I wish he would have told me what was bothering him. I would have done something. This will stay with me, with all of us," he said.

___

Associated Press writer Meg Kinnard contributed to this report