The man who gunned down 19 children and two teachers in the Texas elementary school massacre wrote "I'm going to shoot an elementary school" in a Facebook message 15 minutes before he barricaded himself inside a classroom and fired indiscriminately, officials said Wednesday.
The gunman gave "no meaningful forewarning" of the violence he intended to unleash except for the Facebook message and two others that came before it, Texas Gov. Greg Abbott said at a news conference.
The two other messages said: "I'm going to shoot my grandmother" and "I shot my grandmother."
Andy Stone, a spokesperson for Meta, Facebook's parent company, said the warnings were sent in private one-to-one text messages that were found after the shooting. Facebook is cooperating with law enforcement, he said in a tweet.
The shooter has been identified as Salvador Rolando Ramos, 18.
After he shot his grandmother in the face, he drove to Robb Elementary School in Uvalde, crashed his car nearby and carried a rifle inside, Abbott said at a news conference that devolved into chaos.
Beto O'Rourke, a Democratic candidate for governor of Texas, interrupted the news conference, telling Abbott that the shooting was "totally predictable" and that he was "doing nothing."
O'Rourke was met by several expletives from the stage, with someone calling him a "sick son of a b----" as police escorted him out.
Abbott blamed the shooting on mental health challenges, not easy access to semi-automatic weapons and other guns.
All victims were in one classroom
The victims were in one classroom, Lt. Chris Olivarez, a spokesperson for the Texas Department of Public Safety, told CNN. Abbott said two classrooms were adjoined.
Olivarez said Wednesday on NBC's "TODAY" show that the shooter "was able to make entry into a classroom, barricaded himself inside that classroom, and again, just began shooting numerous children and teachers who were in that classroom, having no regard for human life."
He "just began shooting anyone that was in his way," he added.
Olivarez, a father, called the gunman a "complete evil person."
Officers who were first to the scene heard the gunfire and tried to get in but were met with a barrage of bullets, he said. Some of them were hit.
Unable to immediately put a stop to the carnage in the classroom, officers worked to evacuate students and staff members from other parts of the building.
One teacher told NBC News that when she heard an explosion of gunfire down the hall, she ordered her students to get under their desks and raced to the classroom door, locking it.
The sound of wailing could be heard down the hall, the teacher said. Some of her students started crying.
It was "the longest 35 minutes of my life," the teacher said.
Inside the classroom where the gunman barricaded himself, teachers Eva Mireles and Irma Garcia appeared to be trying to protect their students when they were fatally shot, relatives said.
Other students confirmed to have been killed include Xavier Lopez, 10; Jose Flores Jr., 10; Uziyah Garcia; Alithia Ramirez; Annabell Guadalupe Rodriguez, 10; Eliahana Cruz Torres, 10; Eliahna "Ellie" Garcia, 10; Rojelio Torres, 10; Jacklyn Cazares, 10; Jailah Nicole Silguero; Jayce Carmelo Luevanos; Tess Mata; and Makenna Lee Elrod.
Her father, Felix Rubio of the Uvalde County Sheriff's Office, told the network that he was among the law enforcement officers who responded to the shooting.
"All I can hope is that she's just not a number," he told CNN. "This is enough."
'We're here for Uvalde'
Under a flag flying at half mast, a crying woman distributed flowers and balloons to mourners gathered at San Fernando Cathedral in San Antonio for an evening vigil to honor the victims of Tuesday's massacre.
It was one of at least three vigils held across the state Wednesday.
"We're here for Uvalde," said Mayor Ron Nirenberg. "We're here to be a witness to the collective trauma."
Interfaith leaders and local officials joined together in a half circle as the cathedral's bell rolled 21 times, once for each victim.
One by one, 21 balloons floated up as dozens of mourners turned west towards Uvalde.
Four members of elite Border Patrol tactical teams were part of the group of law enforcement officers that went into the classroom and killed the Uvalde gunman, a Customs and Border Protection official said.
One of the officers went in first with a holding shield, the CBP official said. The other three fired their weapons. It's unclear whose gun fired the bullet that hit the the shooter.
The sources said the gunman was killed as he continued firing from a behind a barricade. A CBP agent was wounded, the sources said.
Many agents live in Uvalde and have connections with the school. Both on- and off-duty Border Patrol personnel arrived at the scene to transfer students to safety, a Department of Homeland Security spokesperson said.
Seventeen more people were injured, Abbott said Wednesday. Their injuries are not thought to be life-threatening.
University Hospital in San Antonio said a 66-year-old woman and a 10-year-old girl listed in critical condition Tuesday were in serious condition Wednesday. A 10-year-old girl remains in good condition, and a 9-year-old girl previously listed in fair condition is now in good condition. The children's families are with them, the hospital said.
Uvalde Memorial Hospital received 14 patients, 11 of whom were described as children ages 8 to 10, CEO Tom Nordwick said Tuesday evening. Four have been released, and two, a male and a female, were dead on arrival, Nordwick said.
More from NBC News:
Brooke Army Medical Center at Joint Base San Antonio-Fort Sam Houston said two adults listed in critical condition Tuesday were in serious condition Wednesday.
"Our thoughts and prayers are with the patients, families and the community of Uvalde," the facility said in a tweet.
The bodies of those who were killed have been removed from the school, Olivarez said Wednesday. All of their families have been notified.
Motive remains unclear
The gunman shot his grandmother, who was hospitalized in critical condition, before he drove toward the school.
The shooter legally owned two AR-15-style long rifles, a Smith & Wesson M&P 15 and a Daniel Defense DDM4 V7. He left one behind and took the other into the school.
He also was wearing at least a tactical vest, but it's unclear whether he was wearing body armor, Olivarez told MSNBC. The Bureau of Alcohol, Tobacco, Firearms and Explosives is working with investigators, who are trying to obtain video from inside the school.
The shooter had no adult criminal history, and investigators are having trouble finding any trace of friends, Olivarez said. He bought the rifles shortly after his birthday, officials said.
He had attended high school in the close-knit community, about 85 miles west of San Antonio. Abbott said investigators believe the shooter was a high school dropout.
Juan Alvarez, 62, who has been in a relationship with the shooter's mother for about a year and lives with her, said the gunman left the home about two months ago after he and his mom had an intense argument after he disconnected the Wi-Fi. The two would often fight, Alvarez said.
"He was kind of a weird one. I never got along with him. I never socialized with him. He doesn't talk to nobody," he said. "When you try to talk to him he'd just sit there and walk away."
An overwhelming number of school shooters — 80 percent — display warning signs ahead of their attacks, such as discussing them online or in person, said Jillian Peterson, an associate professor of criminology and criminal justice at Hamline University in Minnesota.
"The most common is they tell their classmates," said Peterson, who has studied hundreds of mass shooters. "We've studied school shootings where 50 students knew the perpetrator was thinking about it.
"We tend to think of these perpetrators as monsters, these outside, evil, awful people who do these horrific things, and of course, what they're doing is monstrous. But we don't think of them as insiders — that they are our classmates, our neighbors, our friends, our kids," Peterson said. "It's hard to imagine that the person sitting in front of you does this."
The shooter's grandfather told ABC News he had no idea his grandson had purchased rifles or that they were in his house.
Because the grandfather, Rolando Reyes, 72, is a felon, he cannot live in a house with firearms, the news outlet reported. If he had known, Reyes would have turned his grandson in, he told ABC News.
In a statement, the National Rifle Association shared "sympathies" with the families of the victims.
"Although an investigation is underway and facts are still emerging, we recognize this was the act of a lone, deranged individual," the NRA said in a statement. "As we gather in Houston, we will reflect on these events, pray for the victims, recognize our patriotic members and pledge to redouble our commitment to making our schools secure."
The NRA's annual conference will be held in Houston over the weekend, three days and less than 300 miles from the massacre.
Former President Donald Trump, Sen. Ted Cruz, R-Texas, and Abbott are expected to speak.
CORRECTION (May 25, 2022, 9:03 p.m. ET): A previous version of this article misstated who disconnected the Wi-Fi. It was the gunman, not his mother.
This is a developing story. Please check back for updates.