A 13-year-old student was arrested with a BB gun and a knife at a high school in the Coney Island section of Brooklyn Thursday.

Officials said the student was caught just before 11 a.m. inside the Rachel Carson High School for Coastal Studies, a school inside I.S. 303 on West Avenue. That building houses four schools.

No one was hurt.

Charges against the teenager, who was taken to the 60th Precinct, are pending.

The Department of Education issued a statement, saying: "Safety is our top priority and the NYPD swiftly and safely recovered the BB gun. Students and staff are safe and the temporary lockdown has been lifted."