At least 26 people were killed and 20 wounded in Texas after a gunman dressed in tactical gear opened fire at a church outside San Antonio on Sunday, investigators confirmed.

Multiple sources speaking to Fox News identified the gunman as 26-year-old Devin Patrick Kelley. The mass shooting unfolded around 11:30 a.m. at First Baptist Church of Sutherland Springs, which is about 30 miles southeast of San Antonio.

Investigators said at a news conference Sunday evening that the victims ranged in age from 5 to 72 years old. One official said about 20 people were hospitalized with injuries ranging from minor to "very severe."

Sunday's massacre is the deadliest church shooting in modern U.S. history. It is also, according to Gov. Greg Abbott, the deadliest mass shooting in Texas history.

A possible motive was unclear. Kelley lived in a suburb of San Antonio and didn't appear to be linked to organized terrorist groups, a U.S. official told The Associated Press. The official said investigators were looking at social media posts Kelley may have made in the days before Sunday's attack, including one that appeared to show a semiautomatic weapon.

A spokesperson with the U.S. Air Force confirmed to Fox News that Kelley served in the military branch at Holloman Air Force Base in New Mexico from 2010 until a bad conduct discharge in 2014.

He was court-martialed in 2012 for assaulting his wife and child, and when he was discharged received 12 months of confinement and a reduction in military rank.

"It is horrible," Wilson County Commissioner Larry Wiley told Fox News of the massacre. "It appears someone walked in and started shooting."

Around 11:20 a.m., Kelley arrived at a Valero gas station across from the First Baptist Church dressed in black tactical gear and a ballistic vest. He crossed the street and started firing a Ruger AR rifle at the church, officials said. He entered the building and kept shooting.

He was confronted by an armed nearby resident who chased after him. Kelley was later found dead, roughly five miles away in Guadalupe County, according to Wiley. It's unclear whether Kelley was killed by police or the armed resident, or from a self-inflicted gunshot wound.

"We have accepted a multiple number of patients from the shooting," Megan Posey, a spokeswoman for Connally Memorial Medical Center in Floresville, 15 miles from the church, told Fox News.

Some victims were transported to Brooke Army Medical Center in San Antonio, KSAT reported.

Officials said 23 people were found deceased in First Baptist Church, while two were found dead outside. One person who was transported to a hospital later died.

One of those killed was 14-year-old Annabelle Pomeroy, the church pastor's daughter.

The FBI is investigating the shooting, in addition to multiple other agencies, including the Bureau of Alcohol, Tobacco, Firearms and Explosives. The San Antonio Express-News reported police were checking the gunman's home for explosives following the shooting.

The church's layout would've made it difficult for churchgoers to flee a shooter who came through the front door, according to a congregant attending a vigil at the church Sunday night.

The church was described as having only small exits on the side and in the back, according to Hunter Green. He said if a gunman came through the front door, people "wouldn't have had anywhere to go."

Neighbors of Kelley's told The Associated Press they heard gunfire coming from his direction in recent days.

"It's really loud," 16-year-old Ryan Albers said. "It was someone using automatic weapon fire."

Another neighbor, who argued hearing gunfire in the area is not uncommon, said they had heard gunfire coming from across the street, but couldn't be sure if it was from Kelley's property.

Attorney General Paxton told Fox News that "people never think" a shooting like this can "happen in their communities."

"In a small town ... I can imagine that these people are devastated. And everyone in the community is going to ... have some type of close relationship" to those either killed or injured at the First Baptist Church. He added it's "hard to justify why anyone would do this."

"This is horrific for our tiny little tight-knit town," Alena Berlanga, who lives 10 minutes outside of Sutherland Springs told The Associated Press. "Everybody's going to be affected and everybody knows someone who's affected."

President Trump, speaking from Tokyo during his trip to Asia, called the shooting an "act of evil," and added: "Through the tears and through the sadness, we stand strong."

Earlier, he tweeted: "May God be w/ the people of Sutherland Springs, Texas. The FBI & law enforcement are on the scene. I am monitoring the situation from Japan."

Gov. Abbott said in a statement that "While the details of this horrific act are still under investigation, Cecilia and I want to send our sincerest thoughts and prayers to all those who have been affected by this evil act."

"I want to thank law enforcement for their response and ask that all Texans pray for the Sutherland Springs community during this time of mourning and loss," the statement read.

Sutherland Springs has a population of about 400 residents.

Sunday's shooting comes just over a month after 58 people were killed and hundreds injured on Oct. 1 after a gunman opened fire on a country music festival in Las Vegas.

Fox News' Robert Gearty, Jake Gibson, Rick Leventhal, Lucas Tomlinson and The Associated Press contributed to this report.