A makeshift memorial in front of Robb Elementary School in Uvalde, Texas, where a lone gun killed 19 children and two teachers on Tuesday in the latest spasm of deadly gun violence in the United States.
CNN  — 

The Uvalde school district where 19 children and two teachers were killed by a gunman this week had a safety plan that included its own police force, social media monitoring and a threat reporting system to “provide a safe and secure environment” for students.

The two-page document on the Uvalde Consolidated Independent School District website lists 21 different measures it says its undertaken for the safety of the school community, ranging from an app for reporting bullying to physical security measures like fencing and a buzz-in door system. It’s not clear to what degree the plan was developed with active shooters in mind.

Texas Department of Public Safety spokesman Chris Olivarez on Thursday said the gunman, identified as Salvador Ramos, “was able to make entry into that school unimpeded” through an unlocked door.

“We’re working closely with the school district, with the superintendent, to see what the policies were in place,” Olivarez said.

Records show the district spent about $200,000 on security and monitoring services in 2017-18 and that figure rose to more than $450,000 in the 2019-20 school year.

The district employed four police officers, including a chief, detective, and two officers. The school district also had additional security staff “who patrol door entrances, parking lots and perimeters of the campuses.”

The plan included a “threat reporting system” for “students, parents, staff, and community members” to share information that is deemed “troubling,” which could include information “about weapons, threats, fights, drugs, self-harm, suicide or disclosures made that are concerning.” The policy states reports could be made through the district site or to a district staff member.

The district also employed a company called Social Sentinel to monitor social media “with a connection to Uvalde as a measure to identify any possible threats that might be made against students and or staff within the school district.”

Texas Gov. Greg Abbott said the gunman wrote about his intentions on Facebook, including “I’m going to shoot an elementary school.” A spokesman for Meta, Facebook’s parent company, said the gunman’s private one-to-one messages were discovered after the shooting.

Ramos allegedly sent similarly chilling text messages to a girl he met online describing how he had just shot his grandmother and was going to shoot up an elementary school.

The security plan also refers to lockdown drills. “Students receive training on the Standard Response Protocol for lockout, lockdown, evacuate, shelter, and hold. In addition, drills are held for each of these emergency actions on a regular basis.”

Two other schools, Uvalde High School and Anthon Elementary, have security vestibules, though it is not clear if Robb had one. The plan lists security cameras at the high school and middle schools, though it’s not clear how many are at the grade school where the shooting happened. “Key staff” were also equipped with radios, but it’s not clear if those were for use within the building or meant to communicate across the district.

The document is undated, but has “19-20” in the file name, possibly a reference to the 2019-2020 school year.

The Uvalde Consolidated Independent School District has not responded to multiple CNN requests for comment.