Officers from the Dallas County Sheriff's Office and Iowa State Patrol took 46-year-old Scott Michael Greene into custody.

DES MOINES, Iowa — A white man with a history of racial provocations and confrontations with police ambushed and fatally shot two white Des Moines area police officers in separate incidents Wednesday morning, police said.



Authorities took 46-year-old Scott Michael Greene into custody hours after the killings and less than three weeks after he argued with officers who removed him from a high school football game where he had unfurled a Confederate flag near black spectators.



Greene flagged down a state Department of Natural Resources employee in a rural area west of Des Moines, identified himself and asked that he call 911. Sheriff's office and state patrol officers responded and took Greene into custody.



He's suspected in the early morning killings of two officers, who were shot as they sat in their cars. Police identified the men killed as Officer Justin Martin, who had been with the Urbandale force since 2015, and Sgt. Anthony "Tony" Beminio, who joined the department in Des Moines in 2005.



Greene was taken to a hospital for treatment of unknown health issues and will be brought later to Des Moines police headquarters, where he will be questioned and charged, Sgt. Paul Parizek said.



Police responded to a report of shots fired at 1:06 a.m. and found an Urbandale Police Department officer who had been shot. Authorities from several agencies saturated the area after that shooting, and about 20 minutes later discovered that a Des Moines officer who had responded to the initial killing had been shot in a patrol car at an intersection, Parizek said. The shootings happened less than 2 miles apart and both took place along main streets that cut through residential areas.



Urbandale Police Chief Ross McCarty said that in the first shooting, investigators believe the shooter walked up to the officer's car and shot without warning.



"I wouldn't call it a confrontation," McCarty said. "I don't think he may have even been aware that there was a gunman next to him."



The shootings follow a spate of police killings, including ambushes of officers in Dallas and Baton Rouge, Louisiana. Five officers were killed in Dallas on July 7 and three were killed later that month in Baton Rouge.



Race has been an issue in those cases and others involving unarmed black men killed by officers.



Although Greene is white, as were the officers, Greene appeared to have issues with race.



In the confrontation at the Urbandale high school football game, which Greene videotaped and posted on social media, McCarty said Greene appeared to be trying to antagonize African-American fans when he shook a confederate flag in front of them during the national anthem. In the video, officers can be seen asking Greene to leave, telling him that displaying a Confederate flag there was inflammatory. Greene meanwhile argues that his constitutional rights are being violated.



In other incidents, court records show Greene was jailed and charged with interference with official acts after resisting Urbandale police officers who tried to pat him down for a weapon on April 10, 2014. An Urbandale officer described him as hostile and combative. He entered a guilty plea and was fined.



Two days later Urbandale police were called to answer a complaint of harassment at the apartment complex where Greene lived. The complaint said he threatened to kill another man during a confrontation in the parking lot and yelled a racial slur used against blacks. Greene was charged with harassment.



He pleaded guilty and received a suspended jail sentence and a year of probation. Court records show he completed a substance abuse and psychological evaluation.



Soon after the football game incident, on Oct. 17, a criminal complaint indicates Greene was involved in an altercation with his 66-year-old mother. Greene accused her of scratching and hitting his face. He captured the fight on cellphone video, which he used as evidence of the assault. A judge ordered Greene's mother to stay away from her son and she was released on $1,000 cash bond.



Des Moines and Urbandale Police later said they had identified Greene, of Urbandale, as a suspect in the killings through "a series of leads and investigative tips." It is unclear if either of the shootings was captured on police cameras.



The attacks on police this summer in Dallas and Baton Rouge came in the wake of several high-profile police shootings of black men, fueling a national debate about police use of force, especially against minorities — a frequent topic in the nation's presidential race.



Republican nominee Donald Trump has argued that police need the freedom to use greater force, while Democrat Hillary Clinton has supported officers while calling attention to what she and others have called examples of bias in policing.



Parizek said the officers' deaths are a blow to the city.



"They are our friends and co-workers," he said. "Des Moines is not a big city. We all know each other. We're heart broken."