Authorities continue to investigate if deadly Texas school shooting could have been prevented

An 18-year-old gunman killed 19 children and two teachers at a Texas elementary school on Tuesday, officials said.

The suspect, later identified as Salvador Ramos, was killed.

New details were released Wednesday about how the mass shooting happened at Robb Elementary in Uvalde and how the heroic efforts of patrol officers kept the shooter from reaching more classrooms.

RELATED: Texas school shooting: What we know about the victims in Uvalde

Ramos had no criminal history that the state has been able to identify and no history of mental illness.

He was a high school dropout who had been living with his grandmother for the past several months.

Law enforcement said they are "astounded" that, so far, they can find no tell-tale signs something sick and sinister was going to take place before the day of the shooting.

"We've yet to find a clue whether it was social media or other indicators that might have given us any type of idea that he was about to do something like this and give us an opportunity to prevent it," Texas Department of Public Safety Director Steven McCraw said.

The only clues from Ramos were minutes before his rampage began, with three Facebook messages to a girl he knew. All of them were private messages, according to the company.

"At approximately eleven o’clock, he announced in one Facebook post that he was going to shoot his grandmother. He shot his grandmother. He re-reported that he had shot her, and after that, he reported that he was going to a school to attack it," McCraw said.

While he posted it would be an elementary school, he did not name it. That was about fifteen minutes before he arrived at Robb Elementary.

RELATED: Texas school shooter allegedly sent chilling message to woman on Instagram before killing kids: source

His grandmother was shot in the face, and somehow able to call police. He'd been living with her since March.

Ramos drove about a block and a half to the school, where he crashed the vehicle, his grandmother’s pickup truck, into a ditch.

"He exited. At that point in time, he exited with a backpack, he took a rifle with him, one rifle, it was a Daniel Defense," McCraw explained. 

The dropout from Uvalde High School purchased that weapon, a Daniel Defense semiautomatic rifle, and another rifle and hundreds of rounds of ammunition legally last week, just days after his 18th birthday, from a Uvalde gun store, planning something apparently no one else knew.

RELATED: Texas school shooter bought 2 rifles days after turning 18, 'no known mental health history,' Abbott says

Once out of the truck, Ramos moved to the back of the school, where he was confronted by a school resource officer, who asked what he was doing there.

"Gunfire was not exchanged, but the subject was able to make it into the school," McCraw said. "He went down a hallway, then turned right, then turned left. There was two classrooms that were adjoining and that’s where the carnage began. 

Two Uvalde police officers tried to follow him inside. They were shot, suffering non-life threatening injuries.

Ramos then barricaded himself inside the two connecting classrooms, where began shooting, killing 19 students and two teachers.

As he started shooting, Uvalde patrol officers and school police began arriving. They were reportedly critical in keeping Ramos from roaming to other classrooms.

Two Uvalde police officers were shot, suffering non-life threatening injuries.

"And continued to keep him pinned down in that location afterwards, until a tactical team could be put together," McCraw said.

Authorities then "breached the classroom door, they went in, engaged Ramos, and killed him."

RELATED: Who is Salvador Ramos? What we know about Texas elementary school shooting suspect

The hat that the Border Patrol officer was wearing when he killed Ramos reportedly shows where a bullet grazed his head, according to a source with Customs and Border Patrol.

McCraw had praise for the officers who held Ramos at bay, while saying law enforcement did not keep the children safe.

"Obviously, this is a situation, we failed in the sense that we didn’t prevent this mass attack, but I can tell you those officers that arrived on the scene and put their lives in danger, they saved other kids. They kept him pinned down and we're very proud of that," he said.

Investigators said they're also talking to a female who said the gunman had been messaging her on Instagram, but did not reveal exactly what he planned to do.

There are three crime scenes related to the school shooting.

The first is Ramos’ grandparents’ home where he lived.

On Wednesday, the FBI was seen at the home collecting evidence.

Ramos’ grandfather, Rolando Reyes, was intercepted by reporters as he tried to arrive home.

He said he didn’t know there were guns in his home.

When asked about his wife’s condition, he told a Spanish language reporter that she’s still alive and she’s not in grave condition.

Then there’s the second crime scene, his grandmother’s pickup truck, which he crashed in near the school.

The third crime scene is inside Robb Elementary School, where authorities said Ramos killed 19 children and two teachers.

"I think we want to know what was going on with this individual in those 24-36-48 hours leading up to this. Who was he talking to? Who was he communicating with?" said retired Dallas ISD Chief of Police Craig Miller.

Miller added there’s concern about how Ramos entered through a back door.

"But I think, right now, we all want to know, the one question, why was the door open?"

Miller believes many will discuss strengthening school security.

"If you’re not going to lock the door and someone can come in from the outside, it’s all for nothing," he added.

Uvalde ISD organized a community prayer vigil that was held Wednesday at the Uvalde County Fairplex.

Beto O'Rourke Interrupts Press Conference

Just as Governor Greg Abbott was wrapping up his initial remarks at a press conference Wednesday, his Democratic challenger, Beto O'Rourke, interrupted the press conference, calling the shooting "totally predictable when you choose to do nothing."

Lieutenant Governor Dan Patrick told O'Rourke he was "out of line and an embarrassment."

As he was being escorted out, O'Rourke turned around, faced the stage and pointed his finger at Gov. Abbott, saying, "this is on you until you do something different."

"It’s never the right time, it’s never a good time. This is the only time that we're focused on what just happened. It's the only time to call for the action we need that's going to prevent this from happening again," O’Rourke said.

RELATED: Beto O’Rourke interrupts Texas school shooting press conference: ‘You’re doing nothing’

O’Rourke has campaigned for tougher gun restrictions and openly pledged to take away AR-style rifles.

Abbott, meanwhile, said more needs to be done to address mental health issues.

Although, at the news conference, he said the gunman had no known mental health history.