Updated

A student brought a gun to a South Carolina high school and accidentally shot himself in the cafeteria Friday, causing a brief lockdown, investigators revealed.

Greenville County Sheriff's Office spokesman Drew Pinciaro said investigators were still trying to figure out the circumstances behind the gunfire at Southside High School.

School district spokeswoman Beth Brotherton said the unnamed student was conscious and talking and was taken to a local hospital.

School district officials were starting to dismiss students to buses, drive home or be picked up by their parents.

Southside and several other schools in the area were put on lockdown earlier in the day as district officials set up a perimeter around the school.

"As soon as law enforcement reaches a point in their investigation that they can allow us to release students we will dismiss to parents or guardians with appropriate permission," school officials told Fox Carolina.

Dispatchers told local media outlets the shooting appeared to be isolated.

Click for more from Fox Carolina.

The Associated Press contributed to this report.