Three police officers were injured in the incident which began with a traffic stop.

The death toll in a mass shooting that unfurled chaotically on highways in western Texas has risen to seven, local media reported Sunday, citing authorities.

Police had said Saturday that five people died and 21 were wounded in the extended shootout on roads between the cities of Midland and Odessa.

The assailant died in a shootout with police outside an Odessa movie theater.

On Sunday, an Odessa city spokesman told reporters that there were now eight confirmed deaths, including the shooter -- three in Midland and five in Odessa -- NBC affiliate NewsWest9 reported.

The shooter's identity and motive have yet to be released, though police described him as a white man in his mid-30s.

The incident began when troopers tried to pull over a gold-colored passenger vehicle on the Interstate 20 highway.

Before it stopped, "the male driver (and only occupant in the vehicle) pointed a rifle toward the rear window of his car and fired several shots toward the DPS patrol unit," the Texas Department of Public Safety said in a statement.

One trooper was wounded, and the suspect fled "and continued shooting innocent people," the department said.

The shooter led police on a wild chase during which he hijacked a US postal truck and opened fire at random.

Coming less than a month after a gunman killed 22 people in the Texas city of El Paso -- less than 300 miles (480 kilometers) west of Odessa -- the latest bloodshed has ignited fresh calls for steps to stem the US scourge of mass shootings.

In a Twitter message Sunday, US President Donald Trump congratulated Texas law enforcement, the FBI and first responders for their response to "the terrible shooting tragedy yesterday... A very tough and sad situation!"

But later, speaking to reporters on the White House lawn, he said that while discussions on curbing gun violence were underway with legislators of both parties, "This really hasn't changed anything."

While he himself spoke after the El Paso shooting of requiring "strong background checks" to prevent unstable people from purchasing guns, Trump said Sunday that recent history showed that "as strong as you make your background checks, they would not have stopped any of it."

But former Texas congressman Beto O'Rourke, who is seeking the Democratic presidential nomination, bluntly disagreed.

He told CNN on Sunday that "if we're not able to act decisively, then we will continue to have this bloodshed."