Heflin police arrested a 23-year-old Opelika man Tuesday after he allegedly entered Cleburne County High School and tried to pass himself off as a new student.

"He was trying to be cute and he did something not very smart that could have cost him his life," police Chief A.J. Benefield said.

The school was on lockdown for about an hour Tuesday morning, after school officials encountered the 23-year-old around 8 a.m., Benefield said. Police have not yet released the man’s name.

Benefield said the man appears to have slipped into the school as a prank, aided by a minor and an 18-year-old, both of whom are students at the school. None of the three were armed, Benefield said.

“When the principal approached him to talk, he took off running,” Benefield said.

Teachers had the man cornered within a couple of minutes, the chief said, but school officials locked down the school as a matter of protocol. Five police units arrived on the scene. The lockdown continued for an hour because police searched the building just to be safe, Benefield said.

The 23-year-old and the 18-year-old will likely be charged with third-degree burglary and interfering with government operations, Benefield said. The minor will face charges of aiding and abetting, he said.

Capitol & statewide reporter Tim Lockette: 256-294-4193. On Twitter @TLockette_Star.