Chilling new surveillance video footage shows the moment deranged gunman Salvador Ramos walks into Robb Elementary School in Texas.

The video captured the 18-year-old killer sneaking up to an unlocked door at the Uvalde school on Tuesday morning before he opened fire with an AR-15 assault rifle, killing 19 children and two teachers, CNN reported.

Ramos confronted an armed school resource officer outside the door, who “did engage with the shooter,” the network reported.

However, according to CNN, it is unclear what the exchange was with the killer — or whether the officer fired his weapon at the shooter or if the two exchanged gunfire before the bloody onslaught.

Ramos spent as long as an hour inside the building before police and US Border Patrol agents stormed the classroom and shot him dead, according to reports.

Heart-wrenching videos outside the elementary school show anguished parents pleading with police to charge the building during the standoff, with cops seen restraining at least one panicked parent on the ground as others yelled at the officers.

Ramos had purchased two assault rifles after his 18th birthday earlier this month.

Surveillance video footage of Salvador Ramos entering Robb Elementary School in Uvalde, Texas, before the shooting.
Ramos killed 19 children and two teachers in the Texas elementary school.
Police officers at the scene of the mass school shooting on May 24, 2022.

On Tuesday, authorities said he shot his grandmother in the face and left her wounded before driving to the school, crashing his pickup truck and entering the building, authorities said.

Police said the carnage included 17 other children who were wounded in the onslaught.