Updated at 5:29 p.m. ET

Dylann Roof, the 21-year-old man arrested in connection with the deadly shootingat one of Charleston, S.C.'s oldest historically black churches, had previously been in trouble with authorities. He was arrested twice recently — once on suspicion of drug possession and another time for trespassing.

Roof's drug arrest occurred Feb. 28 at the Columbiana Mall in Columbia, S.C. That case is continuing. Here's how the arresting officer described what happened:

The incident resulted in Roof being banned for a year from the mall. But in April, he was arrested at the mall again — this time accused of trespassing. He was convicted on the trespassing charge. Here's the incident report:

An undated Facebook photograph of Roof shows him wearing a jacket with two patches. One is an apartheid-era flag of South Africa, and the other is the flag for Rhodesia, the previously white-ruled country now called Zimbabwe.

Police are describing Wednesday night's attack at the Emanuel African Methodist Episcopal Church as a hate crime. Roof is accused of killing nine people at the church. He was arrested today in North Carolina after a manhunt.

Roof repeated ninth grade at White Knoll High School in Lexington County. He left the school in February 2010. A month later, he enrolled at Dreher High School in Columbia, S.C., as a ninth grade student. He left the school in May, The Wall Street Journal reported.

Reuters reported that Carson Cowles, 56, who identified himself as Roof's uncle, said Roof's father had given Dylann Roof a .45-caliber handgun as a 21st birthday present. Cowles described Roof as adrift, but also called him "quiet and soft-spoken."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.