Four months before the deadly shooting rampage at a black Charleston church, Dylann Roof was arrested at a shopping mall on drug charges after going around dressed all in black, asking employees peculiar questions. He was arrested again two months later for violating a one-year ban from the mall.

The two episodes add to the catalog of erratic behavior on Roof's part in the months before the 21-year-old white man was arrested this week in the slaying of nine people at a Bible study session. In addition to having the two run-ins with the law, he bought a gun, railed against blacks and talked about a "plan," a childhood friend said.

A Columbia police report from Feb. 28 said Roof went to a store shoe department and a Bath and Body Works, asking employees how many people were working, when they closed and when they left their jobs.

The officer wrote that Roof appeared nervous and said he was being pressured by his parents to get a job, though he didn't ask either place for a job application.

The officer searched him and found suboxone strips — typically used to treat addiction to heroin and other opiates. At first, Roof lied and said they were Listerine strips. When pressed, he admitted they were suboxone strips and said he had gotten them from a friend and did not have a prescription for them.

Roof was arrested and ordered to stay away from the mall but was arrested again April 26 on a trespassing charge when he returned. He was banned from the mall for three years, until 2018.

The Columbia Police Department would not make the arresting officer available for an interview. An attorney for Roof on the earlier charges, Ken Mathews, did not return a message seeking comment.

In the weeks before the church shooting, a childhood friend said, Roof complained that black people were "taking over the world" and that someone needed to do something about it. Also, his Facebook photo showed him wearing a jacket with flag patches of the former white-ruled regimes of South Africa and Rhodesia.

"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," Joseph Meek Jr. told The Associated Press.

Meeks said Roof also told him that he had used birthday money from his parents to buy a gun and that he had "a plan." He didn't elaborate on what it was, according to Meeks. But Meeks said he knew Roof had a Glock handgun in the trunk of his car.