Former President Barack Obama's education secretary said that parents should boycott their children's schools until the country's gun laws are changed.

Arne Duncan tweeted Friday that it's "tragically necessary" to pull kids out of schools in order to keep them safe from potential gun violence.

His opinion was in response to Education Department former employee Peter Cunningham's tweet that first suggested the move.

This is brilliant, and tragically necessary.

What if no children went to school until gun laws changed to keep them safe?

My family is all in if we can do this at scale.

Parents, will you please join us? https://t.co/Yo4wsFuJI5 — Arne Duncan (@arneduncan) May 18, 2018

Duncan's sentiments come just days after a high school shooting in Santa Fe, Texas, that left 10 dead and another 10 wounded.

'When Is Enough?': Father of FL School Shooting Victim Reacts to TX Tragedy

Ted Cruz on School Shooting: 'Once Again, Texas Has Seen the Face of Evil'

Bill Bennett, the education secretary under President Ronald Reagan, said on "Fox & Friends" that Duncan is saying schools can't be kept safe.

"We can keep our schools safe," he said. "They have metal detectors. There are other things you can do."

Bennett stressed communication between adults and students as a key factor in preventing tragedies at schools.

"Students need to know ... if you see something, say something," he said. "These kids tend to know where the problems are."

He added that keeping children out of school is not a good solution.

"Laying down your brains because of this doesn't make any sense."

Watch more above.

Rep. Issa Rips Congress' Reaction to TX Shooting: They 'Overreact' and Do 'Nothing at All'

Former Detective Dismisses Background Check Fix After TX Shooting: 'It's Empty Rhetoric'

TX Lt. Gov: Shooting Victims' Friends, Parents Say 'Arm Our Teachers'