Dylann Storm Roof confessed to killing nine people at a historic black church in Charleston because he hoped it would start a “race war.” The 21-year-old from Lexington, South Carolina, was taken into custody in Shelby, North Carolina, on Thursday afternoon after a tip from a local resident who saw a man who fit the description of Roof driving on the highway.

Roof created a website this year called the Last Rhodesian, a reference to the white-ruled African country, which fought a bitter civil war against black majority rule before it became Zimbabwe. In photos posted to the website, Roof is seen wearing a jacket with the flags of Rhodesia and apartheid-era South Africa on the breast of his jacket.

Last Rhodesian was discovered at 8:03 a.m. on Saturday, June 20 when a Twitter user found a website registered under Roof's name. Emma Quangel told The Daily Beast she paid $49 to see what lied behind the domain and then discovered his personal website.

The website features a manifesto where Roof wrote he was radicalized via the Internet following the Trayvon Martin case. Roof wrote he researched "black on white violence," which took him to the website of South Carolina-based hate group the Council of Conservative Citizens (formerly the White Citizens' Council).

“Niggers are stupid and violent,” Roof wrote, which should eliminate any doubt about his motive.

“I chose Charleston because it is most historic city in my state, and at one time had the highest ratio of blacks to Whites in the country,” he wrote. “We have no skinheads, no real KKK, no one doing anything but talking on the internet. Well someone has to have the bravery to take it to the real world, and I guess that has to be me.”

Roof reportedly withdrew from family and friends in recent years, dropping out of high school in tenth grade.

John Mullins, who went to school with Roof, told The Daily Beast that he remembers him as being “kind of wild.”

“He used drugs heavily a lot,” Mullins said. “It was obviously harder than marijuana. He was like a pill popper, from what I understood. Like Xanax, and stuff like that.”

GALLERY: Remembering the Victims of Emanuel African Methodist Episcopal Church (PHOTOS)

Mullins said Roof spouted racist messages while in school.

“I never heard him say anything, but just he had that kind of Southern pride, I guess some would say. Strong conservative beliefs,” he said. “He made a lot of racist jokes, but you don’t really take them seriously like that. You don’t really think of it like that.”

But now, “the things he said were kind of not joking,” Mullins added.

Another high school classmate told The Daily Beast that Roof was a nondescript student. “A lot of people don’t remember seeing him,” Adam Martin said. “I had classes with him, [which] is why I remember him.”

But Martin added that he doesn’t believe Roof was bullied at the high school.

“It wasn’t like he got picked on. The school we went to... is so diverse he just couldn’t have gotten picked on,” he said. “Everyone is so different.”

On February 28, Roof was arrested for drug possession at a mall in Columbia, where he was searched by officers after storekeepers complained that he was acting unusually and asking questions about opening hours and the number of staff on the premises. The Wall Street Journal reports a police incident document said Roof was found to have strips of Suboxone, a pain drug sometimes used to treat opiate addiction. He did not have a prescription for the drug, which is commonly sold illegally on the street.

He was banned from the mall for one year and was out on bond waiting for the courts to process his felony drug-possession charges when he was arrested in the parking lot of the same mall two months later. Roof was charged with trespassing on April 26 in violation of his ban from the mall. Roof was found guilty a month later and fined $262.50.He was banned from the mall for one year and was out on bond waiting for the courts to process his felony drug-possession charges when he was arrested in the parking lot of the same mall two months later. Roof was charged with trespassing on April 26 in violation of his ban from the mall. Roof was found guilty a month later and fined $262.50. He was banned from the mall for one year and was out on bond waiting for the courts to process his felony drug-possession charges when he was arrested in the parking lot of the same mall two months later. Roof was charged with trespassing on April 26 in violation of his ban from the mall. Roof was found guilty a month later and fined $262.50.

Roof was banned from the mall for one year and was out on bond waiting for the courts to process his felony drug-possession charges when he was arrested in the parking lot of the same mall two months later. Roof was charged with trespassing on April 26 in violation of his ban from the mall. Roof was found guilty a month later and fined $262.50.

Joseph Meek Jr. told the Associated Press that he and Roof were best friends in middle school, then reconnected a few weeks ago when Roof reached out to Meek on Facebook. Meek says Roof had begun ranting about the murders of Trayvon Martin and Freddie Gray and saying that black people were “taking over the world.”

“Someone needed to do something about it for the white race,” Meek said quoting Roof. “He said he wanted segregation between whites and blacks. I said, ‘That’s not the way it should be.’ But he kept talking about it.”

Meek said they had spent time drinking and hanging out in strip bars. Meek said Roof's behavior had become erratic in recent weeks, he sometimes slept in his car and he talked about burning an American flag and getting a neck tattoo with the word “dagger.”

Roommate Dalton Tyler told ABC News that Roof was “planning something like that for six months.”

“He was big into segregation and other stuff,” Tyler said. “He said he wanted to start a civil war. He said he was going to do something like that and then kill himself.”

Christon Scriven, a friend from a trailer park in Lexington, South Carolina, where Roof was a regular visitor, told the New York Daily News that the alleged gunman had outlined his horrific plans last week.

“He flat out told us he was going to do this stuff,” said Scriven, who is black. “He was looking to kill a bunch of people.”

Scriven said he and their other friends assumed he had been joking.

“He’s weird. You don’t know when to take him seriously and when not to,” he said.

According to Roof’s grandfather and Meeks, the man's family gave him money for his birthday this past April, which it is believed he used to purchase a .45-caliber Glock pistol. (Roof said at his first court appearance on Friday he was not employed.

A court affidavit from Charleston police said Roof's father called them on Thursday morning to identify the man seen on security-camera footage at Emanuel as his son.

Many of Roof’s Facebook friends, including those from his high school, are black. Another high school friend, Antonio Metze, told the AP that Roof “had black friends.”

Yet the cousin of the church’s pastor—who was killed—quoted a survivor who said Roof told the church: “I have to do it. You’re raping our women and taking over the country. You have to go.”

Photos of the Aftermath of Charleston Church Shooting

This story, which was originally published Thursday, has been updated throughout. Additional reporting by Brandy Zadrozny, Justin Miller, and Jacob Siegel.