ST. PAUL, Minn. - A gun brought to school by a first grader went off in a classroom full of students, according to authorities.

Luckily, no one was hurt.

A statement from the St. Paul Public Schools says the 7-year-old student brought the handgun into Crossroads Elementary School on Thursday and had it in a classroom that was full of students. At about 8:40 a.m., the gun went off, striking the floor.

School officials say there was no threat directed at staff or students.

"There are serious consequences for these actions and we will follow our standard discipline procedures," the statement says.

Staff at the school immediately confiscated the gun and contacted police, who are investigating the incident.

St. Paul Police say the gun recovered was a .38-caliber revolver. They say both the student and his family are cooperating with police, as they work to figure out who the gun belongs to, how the child got a hold of it and what could've been done to prevent the incident.

"Today we got lucky. But this incident should still serve as a reminder to anyone who owns a gun to keep it safe, secure and out of the hands of children," St. Paul Police wrote on its Facebook page.

The district's crisis communications team responded and will remain at the school throughout the day, as needed.

Many students at Crossroads were out of school Thursday. This week is an optional "intersession" for students who want or need extra work.