Two police officers were shot and killed early Wednesday while sitting in their patrol cars in the Des Moines, Iowa, area, and the authorities later arrested a 46-year-old Iowa man, who had a history of confrontations with the police, in connection with the “ambush-style attacks.”
The man, identified as Scott Michael Greene, surrendered and was taken into custody in Dallas County, just west of Des Moines, said Sergeant Paul Parizek, a spokesman for the Des Moines Police Department.
“There’s nothing to indicate right now that there’s anybody else involved,” Parizek said.
Officials did not explain how investigators had identified Greene, of Urbandale, Iowa, as a suspect but said he had already been familiar to the police.
“Most of our officers have some understanding of Mr. Greene,” Ross McCarty, the Urbandale police chief, said at a news conference. He did not elaborate.
The two officers who were killed, in separate attacks a few miles apart, were identified as Officer Justin Martin of the Urbandale police and Sergeant Anthony Beminio of the Des Moines police. Both men were apparently caught by surprise and had no chance to defend themselves or return fire, the authorities said.

Beminio was a veteran officer with a wife and children, while Martin, who was in his mid-20s, became an officer just last year, officials said.
McCarty said in the shooting of Martin, it appeared that the gunman had walked up to the side of the patrol car and fired “over 15 and under 30” rounds. Many .223-caliber shell casings were found, but officials said that they had not yet recovered the weapon and that there might have been more than one.
Greene had some confrontations with the police in the recent past, as well as minor criminal convictions, but Parizek said the authorities did not yet know of the motive for the shootings.
“We may never actually know what motivated this act,” he said.
Just a few weeks ago, Urbandale police officers escorted Greene from an Urbandale High School football game, McCarty said, after he waved a Confederate flag in front of black students and others in the crowd complained that he was creating a disturbance. Greene, whose daughter attends the high school, was given a trespass warning, the police said.
“He was working out with the school officials what are the parameters of when he could be on the school grounds and when he could not,” McCarty said.
The first shooting Wednesday, of Martin, occurred at the intersection where that football field is found, a few blocks from the house where Greene lives.
A video, apparently shot by Greene and posted Oct. 16 to a YouTube account in his name, appears to shows the latter part of the high school confrontation; on it, an officer can be heard referring to the man making the recording as Greene.
In April 2014, Greene was arrested and charged with interference with official acts, accused of resisting an Urbandale officer’s attempt to pat him down for weapons. The complaint described him as combative but did not say why the officer had wanted to search him.
Two days later, Greene was arrested again and charged with harassment, after reportedly threatening a man and using a racial slur against him.
He pleaded guilty to misdemeanors in both cases and was fined and given probation. A judge ordered Greene to have no further contact with the man he harassed and to undergo a psychiatric evaluation. In May , fees he owed to Polk County related to those two cases were referred for debt collection.
Greene was arrested on an assault charge in 2001, but the charges in that incident were dropped.
McCarty said Greene had been back in court Tuesday, though he was unsure of the details. “His mother and him had a disagreement over something — I’m not sure if it’s a civil case or criminal,” the chief said.
Greene served in the military in either Iraq or Afghanistan, according to Tim Tinkle, a neighbor, who described a series of personal hardships Greene went through, including the death of his father in 2010. “His wife left him” and “his kids got separated from him,” Tinkle said.
The shootings Wednesday began just after 1 a.m. Central time. The police in Urbandale, a suburb of Des Moines, responding to reports of gunfire, arrived near the intersection of 70th Street and Aurora Avenue, where they found Martin.
Officers from Des Moines, Iowa’s largest city, and other agencies were called in for help. Around 1:30 a.m., Beminio was found shot at the intersection of Merle Hay Road and Sheridan Avenue in Des Moines — about a five-minute drive from where the first officer was found.
“The shootings appear to have been ambush-style attacks,” the Urbandale police said in a statement.
“It doesn’t look like there was an exchange of conversation; there definitely wasn’t an opportunity for these officers to defend themselves,” Parizek said.
Later Wednesday morning, on a gravel road along Interstate 80 in Dallas County, Greene flagged down a passing employee of the state Department of Natural Resources, showed his identification and told the employee to call 911, the sergeant said. Sheriff’s deputies and state troopers responded, found him unarmed, and took him into custody without incident.
“He did complain of some kind of flare-up of an existing medical condition, and he’s been taken to the hospital,” Parizek said.
According to the National Law Enforcement Officers Memorial Fund, killings of officers have risen in the United States this year, and the organization has noted with alarm an increase in “ambush killings” of officers. A report released by the organization in late July noted that there had already been 14 “ambush killings of unsuspecting law enforcement officers” in 2016, compared with three in the same time period the previous year.
