MONROE, N.C. — A student is in custody after police found a gun in his truck at Sun Valley High School Wednesday morning, police said. 

According to Union County Sheriff's Office, a student drove through the drop-off area and the principal observed a long gun in the truck. Deputies said the student drove away at a high rate of speed. 

The Union County Sheriff's Office tweeted that the student is in custody around 10 a.m. The firearm has been secured, according to that tweet.  

Sun Valley High School sent the following message to parents about the lockdown: 

"Good morning Sun Valley High School parents,

This is Dr. Harvey calling with an update on the situation that happened this morning. A student drove onto our campus and an administrator noticed that there was a gun in the car. We immediately ordered a lockdown to keep our campus safe. 

The student immediately left campus and the Union County Sherriff’s Office was notified and deputies launched a search. The student involved never threatened anyone on campus. 

All students and staff remained safe during this incident. At this time, deputies and law enforcement agencies are still searching for the student and there is an active investigation into this matter. There is no threat to our school or to our community, and students are safe in class. The Union County Sheriff’s Office has been here working with our administrative team all morning and we appreciate their support.

Safety is always our number one priority. I want to thank you for your cooperation and patience as we worked through this incident. We will continue on a normal schedule today and will have a normal dismissal."

Mint Hill Police said Union County authorities pinged the phone of the suspect and it pinged behind Rocky River High School on I-485. Mint Hill PD said the suspect vehicle never went onto the property at Rocky River, but the school was placed on a brief lockdown as a precaution. 

Union County Sheriff's Office spokesman Tony Underwood praised the school's quick actions.

"The school staff, the principal did an outstanding job," he said. "They did exactly what they should've done to prevent something from ever happening."

Some parents picked up their children early from school out of concern for their safety.

"School's a scary place these days," one parent said. "Almost, you don't want to send them."

Stay with NBC Charlotte for the latest on this developing story. 

OTHER STORIES ON WCNC