At least 26 people were killed when a lone gunman wearing a ballistic vest and carrying a military-style rifle, opened fire on worshippers at a Baptist church in Texas, police said.
The attack took place on Sunday in Sutherland Springs, some 45 km southeast of San Antonio.
Law enforcement officials told The New York Times that the gunman was identified as Devin Patrick Kelley, 26, who died shortly after the attack. The cause of his death was being investigated.
Kelley started firing at the First Baptist Church shortly after the Sunday morning service began at 11 a.m., the police said.
He was armed with a Ruger military-style rifle, and within minutes, many of those inside the small church were dead and injured.
The victims ranged in age from five to 72, and among the dead were several children, a pregnant woman and the pastor's 14-year-old daughter. It was the deadliest mass shooting in the state's history.
At least 20 more were wounded, The New York Times reported.
Kelley, who lived in New Braunfels, Texas, had served in the Air Force at a base in New Mexico, but was court-martialed in 2012 on charges of assaulting his wife and child.
He was sentenced to 12 months confinement and received a "bad conduct" discharge in 2014, according to Ann Stefanek, the chief of Air Force media operations.
The motive of the attack remains unclear.
"It's something we all say does not happen in small communities, although we found out today it does," said Joe Tackitt, a senior police official.
According to the police, as Kelley emerged from the church leaving behind a scene of carnage, an armed neighbour exchanged gunfire with him, hitting Kelley, who fled in his vehicle.
Kelley then crashed his car and the police found him dead inside the vehicle.
Of the 26 fatalities, 23 people were found dead inside the church, two outside and one died later at a hospital.
Governor Greg Abbott said that he and other Texans were asking "for God's comfort, for God's guidance and for God's healing for all those who are suffering", reports The New York Times.
President Donald Trump, who is currently in Japan on his five-nation Asia trip, called it a "horrific shooting". He ordered flags flown at half-staff at the White House and all federal buildings till Thursday.
In a time of crisis, he said: "Americans will do what we do best: we pull together and join hands and lock arms and through the tears and sadness we stand strong."
Sunday's massacre unfolded on the eighth anniversary of the attack in 2009 on Fort Hood in Texas, when an Army psychiatrist, Major Nidal Malik Hasan, killed 13 people in one of the deadliest mass shootings at an American military base.
The death toll on Sunday also exceeded the number killed in 1966 by a student at the University of Texas at Austin, Charles Whitman, who opened fire from the school's clock tower in a day of violence that killed 17.