Scene of Texas school shooting
Scene of Texas school shooting REUTERS/Marco Bello

Texas Governor Greg Abbott said on Wednesday that the gunman who opened fire at an elementary school in Uvalde on Tuesday, killing 19 children and two teachers, said on Facebook just before the shooting that he was going to attack a school, CBS News reported.

Abbott said the gunman wrote three messages on Facebook before the attack: once, about 30 minutes before the school shooting, to say he was going to shoot his grandmother, once to say he had shot his grandmother, and a third time — approximately 15 minutes before the shooting — to say he was going to open fire at an elementary school.

Facebook said the posts "were private one-to-one text messages that were discovered after the terrible tragedy occurred," and that the company is "closely cooperating with law enforcement."

Authorities say the gunman, identified as Salvador Ramos, shot his 66-year-old grandmother in the face before the school shooting. She contacted police and the suspect fled, later crashing his grandmother's car about a block from the school. He then exited the car and took a backpack and one rifle with him.

A district police officer engaged the gunman when he arrived at the school, but the shooter was able to enter a back door, travel down two short hallways and enter a classroom, which was connected internally to another classroom, Abbott said on Wednesday.

The gunman then barricaded himself in the classroom, Lt. Christopher Olivarez of the Texas Department Public Safety told CBS.

"At that point, [he] just started shooting children and teachers that were inside that classroom, having no regard for human life," Olivarez said. "Just a complete tragedy. An evil person going into the school and killing children for no reason whatsoever."

Abbott said on Wednesday that Ramos was reportedly a high school dropout with no criminal history and no documented mental health concerns. Abbott said there was "no meaningful forewarning," other than the Facebook messages.

Tuesday’s attack was the deadliest mass shooting at an elementary school since a gunman killed 26 people, including 20 first-graders, at Sandy Hook Elementary School in 2012.

US President Joe Biden on Tuesday night called for stronger gun laws in the wake of the Texas massacre.

"As a nation, we have to ask, when in God's name are we going to stand up to the gun lobby?" Biden said in an address from the White House. "When in God's name will we do what we all know in our gut needs to be done?"

"These kinds of mass shootings rarely happen anywhere else in the world. Why?" the president said. "They have mental health problems. They have domestic disputes in other countries. They have people who are lost, but these kinds of mass shootings never happen with the kind of frequency they happen in America. Why? Why are we willing to live with this carnage?"