FORT LAUDERDALE, Fla. — The former student who later shot up Marjory Stoneman Douglas High School was such a threat in school that he was searched every morning for weapons, new testimony shows.

The extraordinary measure followed an earlier decision to bar Nikolas Cruz from taking a backpack to campus after he talked of suicide and wrote “kill” in a notebook.

The search procedure was revealed in a sworn deposition from Kelvin Greenleaf, the security guard who searched Cruz. The South Florida Sun Sentinel obtained a copy of the deposition this week.

“Never found a weapon on him,” Greenleaf explained in the testimony July 11. “I think we got concerned when, I think, we found out he drank bleach, tried to hurt himself or something like that, the kid. That’s when we started, like, having the kid come in every morning to be searched by me, but never found a weapon on the kid, never.”

Administrators forced Cruz to withdraw from Stoneman Douglas within six months — in February 2017.

He walked onto the Parkland campus a year later and fatally shot 14 students and three educators with an assault-style rifle.

Cruz is facing the death penalty.

The district did not respond Thursday to a request for comment about Greenleaf’s statements.

The deposition was taken as part of a wrongful death lawsuit filed by the parents of one of the dead children, Meadow Pollack.

Greenleaf is not a defendant but was a key witness because of his familiarity with Cruz and his role as a lead security specialist.

His surprising testimony shows the school recognized the extreme danger the gun-obsessed, mentally disturbed youth posed.

“They frisked him. … They had to frisk him every day,” said Andy Pollack, the father of Meadow. “They knew that he was a threat. And they subjected all the kids and my daughter to this. Where were their rights? They didn’t tell us that they’re letting a kid in the school that he’s so violent and dangerous we won’t let him in with his backpack and we have to frisk him. But they let this kid into the school with our children.”

Pollack said he wishes he’d known and said if he did, he’d never have sent his daughter to Stoneman Douglas.

The school had a superior reputation as an A-rated school in an affluent, tranquil community.

From the start of his educational path, Cruz was considered a special-needs student.

“Although (the student) has made behavioral progress he continues to lack impulse control. He needs to be monitored while in both the school and neighborhood communities,” a school district report in March 2015 said.

That was only five months before the district transferred Cruz — part-time at first — from a school for children with emotional and behavioral difficulties to Stoneman Douglas.