New York public schools are banned from using federal funds to purchase firearms or to train school staff in the use of such weapons, the state education commissioner announced Thursday.

Commissioner MaryEllen Elia, in a memo issued to all district superintendents and charter school leaders, also barred the spending of state funds for the same purposes or for storing weapons on campuses.

"There is no place in our schools for weapons, no matter the intentions," Elia declared in her directive issued to local officials on Wednesday and released publicly a day later. "We simply cannot afford to use federal education dollars that are intended for teaching and learning to pay for weapons that will compromise our schools and communities."

Last month, U.S. Education Secretary Betsy DeVos announced through aides that she was weighing the question of whether to allow states to draw on federal funds to buy guns. DeVos later backed off that position, saying the issue would be left to Congress, the states and localities.

The debate arose last month after a small rural school district in Oklahoma and the state of Texas asked the department to clarify what the funds can be used for. In Texas, school employees can volunteer to carry weapons on campuses after undergoing training.

Such inquiries often revolve around the use of federal money distributed under the Title IV program, which deals with school safety and prevention of drug use.

Sign up for The Classroom newsletter. Education on Long Island is changing. Find out how. By clicking Sign up, you agree to our privacy policy.

DeVos' press secretary, Liz Hill, responded to Elia's directive, saying, "As the Secretary has said all along, this is a state and local decision."

On Long Island, districts have taken a variety of approaches to upgrade security following mass school shootings this year in Parkland, Florida, and Santa Fe, Texas.

The Hauppauge and Miller Place systems have spent local funds to hire armed security guards — actions allowed under the commissioner's new guidelines. Meanwhile, dozens of other local districts have used state funds to purchase security equipment such as surveillance cameras, monitoring screens and automatic door locks, or to reinforce school entryways and windows against intruders.

"I think the state Education Department has the authority to decide how federal funds would be distributed," said David Flatley, superintendent of Carle Place schools and immediate past president of the Nassau County Council of School Superintendents. "It's not preventing a local school district from deciding to arm their security guards. It's simply telling them that if they want to do that, they'll not be allowed to use Title IV funds for that purpose."

Despite the emphasis on guns, locks and other hardware, many educators contend that schools' best defense is to address students' emotional problems and combat bullying and other behavioral troubles. New York State took a step this year in that direction by mandating that mental-health instruction be included in school curriculums.

"I do think that focusing on mental health is important," said Jay Worona, deputy executive director and general counsel for the New York State School Boards Association. The organization recently sponsored seminars on the subject.

With November elections approaching, the issue of guns in schools has entered the political arena.

State Sen. Todd Kaminsky (D-Long Beach), who last month urged Elia to prohibit schools from using federal funds to arm teachers, said he had been told by educators that "guns in classrooms make everyone less safe and that precious federal funds should be spent on increasing access to educational resources."

Kaminsky's election opponent, Francis X. Becker (R-C-Lynbrook), took a different tack. "While guns on the premises may not be the most desired approach, we should definitely not exclude any approach that makes sense," Becker said.