(Reuters) - A gunman who went on the rampage with an AR-type rifle in West Texas killed seven people and wounded 22 others, including a toddler who was shot in the face, before he was killed by police, authorities said on Sunday.

Police said the second mass shooting in Texas in four weeks began on Saturday afternoon with a routine traffic stop and ended when the suspect, a white male in his 30s, was cornered by officers in the parking lot of a cinema complex.

Police, motorists and shoppers were all caught up in the chaos that unfolded between the cities of Odessa and Midland during a busy Labor Day holiday weekend.

Authorities have said the shooter was known to police and lived locally. Authorities said the investigation continues, but there was no apparent link to domestic or international terrorism.

“There are no definitive answers as to motive or reasons at this point, but we are fairly certain that the subject did act alone,” Odessa Police Chief Michael Gerke said at a news conference.

Gerke said seven victims were killed and 22 wounded, and he offered his condolences to their families.

“My heart aches for them all,” he said.

Among the wounded was a 17-month-old girl, Anderson Davis, who was shot in the face, according to officials and an online fundraising campaign started by her family.

Three police officers were shot and wounded - one from Midland, one from Odessa and a Department of Public Safety state trooper - and were in stable condition.

In a statement on Facebook, Odessa police named the gunman as Seth Aaron Ator, 36, of Odessa.

Online court records showed Ator had convictions in 2002 for criminal trespass and evading arrest. The Midland Reporter-Telegram newspaper quoted a state lawmaker, Rep. Tom Craddick, as saying he had previously failed a background check.

On Aug. 3, a gunman from the Dallas area killed 22 people in another Saturday shooting at a Walmart store about 255 miles (410 km) west of Midland in the city of El Paso, Texas.

President Donald Trump called the Odessa-Midland shooter “a very sick person,” but said background checks on gun buyers would not have prevented recent U.S. gun violence.

Slideshow ( 18 images )

In remarks to reporters on Sunday, Trump said he would be working with Democrats and Republicans on gun legislation when Congress returns this month. “I think you’re going to see some interesting things coming along,” he said.

The bloodshed between Midland and Odessa began when two state troopers pulled over a car on Interstate 20 for not using its turn signal and the lone occupant fired at their patrol vehicle with an “AR-type” rifle, or lightweight semi-automatic, wounding one of them.

After fleeing, the suspect hijacked a postal van and opened fire on passersby before being shot dead outside the Cinergy cinema complex in Odessa, police said.

Slideshow ( 18 images )

Texas Governor Greg Abbot praised first responders and medical personnel, and told reporters that the hurt felt by the victims was “incalculable.”

And he read a text message he received from the wounded toddler’s mother, thanking everyone for their prayers.

“I have been to too many of these events,” Abbot said, reciting the shootings in Dallas, Sutherland Springs, Santa Fe High School and El Paso that have happened since he became governor in 2015.

“I’m heartbroken by the crying of the people of the state of Texas. I’m tired of the dying of the people of the state of Texas ... the status quo in Texas is unacceptable, and action is needed,” Abbot said.