Homeland Security Secretary Alejandro Mayorkas on Wednesday praised Border Patrol agents who responded to the deadly shooting in Uvalde, Texas -- saying that their heroism "saved lives."

"We are grateful for the courageous members of our Border Patrol, many of whom are part of the Uvalde and surrounding communities, who immediately responded to the scene along with local and state law enforcement," Mayorkas said in a statement.

CLICK HERE FOR LIVE UPDATES ON THE UVALDE, TEXAS SCHOOL SHOOTING

Mayorkas was responding to the shooting at Robb Elementary in Uvalde, Texas, where a gunman shot and killed 19 students and two teachers. Suspected gunman Salvador Ramos, a Uvalde resident, acted alone, according to authorities.

An agent with the Border Patrol Tactical Unit (BORTAC), a specialized unit within Border Patrol, is believed to have shot and killed the gunman. 

Homeland Security Secretary Alejandro Mayorkas visited the U.S. southern border, Tuesday, May 17, 2022.

Homeland Security Secretary Alejandro Mayorkas visited the U.S. southern border, Tuesday, May 17, 2022. (Pool video)

The agent entered the school with a team while other law enforcement officers engaged with the suspect who was barricaded, Border Patrol sources told Fox News. The agent was struck in the leg by either a bullet or shrapnel. 

Mayorkas confirmed the injury, while praising the Border Patrol agents involved.

BIDEN DEMANDS GUN CONTROL FOLLOWING UVALDE, TEXAS ELEMENTARY SCHOOL SHOOTING

"Without hesitation, they put themselves between the shooter and students to end the bloodshed and administer medical aid. Without question, their heroism yesterday saved lives," he said. "A Border Patrol Agent was injured in the crossfire yesterday and we know the loss and trauma from this tragedy will continue to impact many other CBP families for a long time to come."

BORTAC provides immediate response to high-risk incidents requiring special skills and tactics, according to the Border Patrol. The team has full-time members based in El Paso, Texas and non-full-time members throughout the United States.

Mayorkas also sent his condolences to the families of those killed in the attack.

"No words can come close to comforting the families of those lost in Uvalde yesterday," he said. "We at the Department of Homeland Security are horrified by this callous act of violence."

"We grieve for the families and loved ones of the children and teachers lost, and with the people of the community of Uvalde. We are hopeful for the full and fast recovery of those who suffered injuries," he said.

Former Immigration and Customs Enforcement (ICE) acting Director Thomas Homan was among those who also praised Border Patrol -- who he said have had a tough year under the Biden administration.

CLICK HERE TO GET THE FOX NEWS APP 

"These men and women are America's heroes," he said.

"These men and women are working overtime, 24/7, biggest crisis ever seen. But when they were needed, they didn't hesitate to go to that school and face the gunfire."

Fox News’ Joshua Nelson and Bill Melugin contributed to this report.