A Berkeley County seventh-grader took a gun to school Tuesday because he had been arguing with another student, according to the sheriff's office.

The 13-year-old student at Sedgefield Middle School was arrested and charged with possession of a firearm on school property and with making threats, sheriff's office spokesman Dan Moon said.

A school resource officer got a call that a student might be intending to cause trouble because of an ongoing argument, Moon said. The 13-year-old was pulled from class for questioning. He had a semi-automatic handgun in his backpack, according to Moon.

The student said he had taken his mother's gun without her knowledge to defend himself against a 14-year-old with whom he had been arguing, Moon said.

The student with the gun was taken to the Department of Juvenile Justice in Columbia.

Parents were made aware of the situation through the district's notification system, according to district spokeswoman Susan Haire.

"Berkeley County School District does not tolerate the possession of firearms on school grounds," she said in a statement.

Christina Elmore contributed to this story. Reach Dave Munday at 937-5553.