The young white man arrested Thursday in the shooting deaths at a historic black Charleston church lived near the swamps of the Congaree River, wore patches popular in white supremacist circles, had strong conservative beliefs about the South and may have recently received a gun for his birthday, according to friends and relatives.

Just before noon, police arrested Dylann Storm Roof, 21, about 250 miles from Charleston in Shelby, N.C., ending a 15-hour manhunt. He waived extradition and was flown to Charleston on a state plane. He landed at Charleston International Airport and was whisked to the county jail for booking.

But the public’s first glimpse of the shooting suspect had come earlier in the morning when police circulated surveillance photographs.

The photos showed a thin white man with a bowl haircut enter the wooden doors of Emanuel AME Church at 8:16 p.m., after parking a dark-colored Hyundai. The shooting happened about an hour later.

Carson Cowles, 56, told Reuters by phone that he recognized the man in the surveillance photo as his nephew. “The more I look at him, the more I’m convinced, that’s him,” he said, adding that he believed the shooter’s father had recently given him a .45-caliber handgun as a birthday present.

“Nobody in my family had seen anything like this coming,” Cowles also told Reuters. “I said, if it is him, and when they catch him, he’s got to pay for this.” Cowles said he had told his sister, Roof’s mother, several years ago that Roof was too introverted. “I said he was like 19 years old, he still didn’t have a job, a driver’s license or anything like that and he just stayed in his room a lot of the time.”

Roof lived in Eastover, a rural town between Columbia and Congaree National Park. Police gathered by the two-story log house Thursday. An American flag hung over the entrance. When a reporter approached, a man inside the house said he would call deputies if the reporter didn’t leave.

But a picture of a troubled young man began to emerge of Roof, based on reports from friends, two arrests and the digital trail he left on social media sites.

On his Facebook page, he listed his high school as White Knoll High School in Lexington County about 40 miles west of Eastover. Lexington County officials said that he dropped out of White Knoll in February 2010, when he was in the 10th grade. It wasn’t immediately clear whether he transferred to another school.

His life took a turn on Feb. 28 when he was arrested at the Columbiana Centre mall. Employees there called police after Roof asked questions about the number of employees in the stores and when the stores closed.

Officers then found Roof wearing all-black clothes and carrying a pill bottle of Suboxone, a painkiller used to treat opiate addiction. The arrest affidavit said that Roof admitted that he didn’t have a prescription for the drugs.

He was banned for a year from the mall, but on April 26, Columbia police arrested him again at the mall, this time on a trespassing charge. He was fined $262.50.

On May 21, Roof’s Facebook profile picture changed to one of him standing in a swamp of bare cypress trees covered in Spanish moss. He had a mop-top haircut and looked straight ahead at the camera with a frown. He wore a black jacket with two flag patches on the right front. One flag was the old South African flag that was flown during Apartheid; the other was the flag flown by white-ruled Rhodesia, now Zimbabwe. Both flags are known to be symbols popular in white supremacist groups, experts say.

The Southern Poverty Law Center also found a photograph of Roof sitting on the hood of a Hyundai with a “Confederate States of America” tag.

A friend, Joseph Meek Jr., said Roof told him recently that black people were taking over the world and that something needed to be done for the white race. The two had been best friends in middle school but lost touch when Roof moved away about five years ago. They recently reconnected, Meek said, adding that Roof’s racial comments came completely out of the blue and that he could tell something was troubling his friend.

Meek told The Associated Press that when he woke up Wednesday morning, Roof was at his house, sleeping in his car outside. Later that day, Meek went to a nearby lake with a couple of other people, but Roof hated the outdoors and decided he’d rather go see a movie.

Dalton Tyler told ABC News that he had known Roof for a year. “He was big into segregation and other stuff. He said he wanted to start a civil war. He said he was going to do something like that and then kill himself.”

Others were shocked over the news of the shooting and his arrest. “I never thought he’d do something like this,” high school friend Antonio Metze told The Associated Press. “He had black friends.”

Kimberly Konzny, Meek’s mother, said she didn’t know why Roof was in Charleston and was not aware of his being involved in any church groups or saying anything racist. “I don’t know what was going through his head,” Konzny told the AP. “He was a really sweet kid. He was quiet. He only had a few friends.”

John Mullins, who went to high school with Roof, told The Daily Beast that he remembers him as being “kind of wild” but wasn’t considered an outcast. Mullins said that Roof had a reputation for making racist statements and had “that kind of Southern pride, I guess some would say — strong conservative beliefs. 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.”

Cynthia Roldan and Diane Knich of The Post and Courier and The Associated Press contributed to this report.