A sister of Dylann Roof, the man who massacred nine black churchgoers in South Carolina in 2015, was arrested on Wednesday for bringing a knife, pepper spray and marijuana to her high school, the authorities said.

Morgan Roof, 18, was arrested on drugs and weapons charges at her high school, A.C. Flora, in Columbia, S.C., and taken to a detention center, Richland County Sheriff Leon Lott said in a statement.

Sheriff Lott said that a school resource officer was informed by an administrator that Ms. Roof had the weapons and drugs. “Roof had also made a social media post on Snapchat which caused alarm to the student body,” Sheriff Lott said. No students were harmed, he said.