A student brought a BB gun into a Minneapolis middle school as classes were about to start Tuesday, prompting a brief lockdown and resulting in the youngster being taken into custody, officials said.

The lockdown at Anwatin Middle School on Upton Avenue S. in the Bryn Mawr neighborhood began about 8:30 a.m. and was over within 30 minutes, said School District spokesman Dirk Tedmon.

The weapon was not fired, Tedmon said.

Police spokesman John Elder said the student “was in custody” and the scene quickly “rendered safe,” but he had no other information to share.