OKLAHOMA CITY -- A man confronted his ex-wife and another man in an Oklahoma Walmart parking lot, shot and killed them both through the windshield of a car then turned the gun on himself as horrified onlookers ran for cover, police said Tuesday.

Duncan police identified the shooter in Monday's attack as 43-year-old Wbiliado Varela, Jr. Also killed were Rebecca Vescio Varela, 31, and Aubrey Perkins, 39.

Detective John Byers described the double-murder suicide as the result of a domestic dispute. He said the two victims had exited the Walmart and got into a vehicle when Varela left own vehicle and approached them with a 9 mm, semi-automatic pistol.

"Varela exits the vehicle, fires multiple rounds into the windshield and strikes Vescio and Perkins multiple times, and then goes to the rear of the car and turns the gun on himself, firing one time and killing himself," Byers said.

Byers said all three were dead when police arrived on the scene shortly after 9:30 a.m. Monday.

Authorities are reviewing video from multiple locations, including Walmart security video that depicts at least some of the shooting, Duncan Police Chief Dan Ford said.

Ford said there were several witnesses in the parking lot at the time of the shooting, some of whom ducked and ran for cover.

When officers arrived on the scene, Byers said they were initially distracted by an armed citizen who had drawn his own weapon after hearing gunshots.

"We did take his firearm at the time and later returned it to him after interviewing him," Byers said.

Rebecca Varela worked at the Walmart but was not on duty at the time of the shooting, Byers said.

Duncan is a city of more than 22,000 residents located about 80 miles (130 kilometres) south of Oklahoma City. The Walmart is in a commercial centre that includes a sporting goods store and a dollar store along U.S. Highway 81, the main road that passes through Duncan heading south toward Texas.

It was at least the third shooting at a Walmart in the U.S. this year. A Walmart store in El Paso, Texas, reopened Thursday after being closed since August, when a gunman opened fire in the busy store, killing 22. Just days before, two Walmart employees in Mississippi were killed by a man whom authorities described as a disgruntled Walmart worker.

The killings in Oklahoma come amid a spate of high-profile shootings across the U.S. A 16-year-old student at a high school in the city of Santa Clarita outside Los Angeles shot and killed two classmates and wounded three other teens Thursday before shooting himself in the head. He died the next day.

In New Jersey, players and spectators ran for cover Friday night when a gunman opened fire at a high school football game, wounding two people. And on Sunday, four people were killed and six wounded in Fresno, California, where police say two shooters sneaked into a backyard party and shot into a group of Hmong family and friends.