Police in  Iowa  said on Wednesday they have captured a man suspected of killing two police officers hours earlier as they sat in their patrol cars in what authorities called separate and unprovoked attacks.

Scott Michael Greene, who is 46 and white, was taken into custody after police named him as their suspect in the ambushes, a police spokeswoman in Urbandale,  Iowa  said. 

Police said they found the first slain officer's body about 1:06 a.m. (2.06 a.m. ET) in Urbandale, an affluent Des Moines suburb, and the second about 20 minutes later about two miles away, in Des Moines. Police declined to release the names of the officers awaiting notification of their families.

It was unclear what provoked Wednesday's attacks, Des Moines police department spokesman Paul Parizek told a news conference prior to Greene's arrest, adding that "we may never know." But it appeared the suspect had a recent run-in with police.

A 10-minute video posted on YouTube last month by a user calling himself Scott Greene showed an interaction with officers following an incident at a sports stadium in which he described holding up a Confederate battle flag during the playing of the U.S. national anthem. He is heard claiming that he was assaulted.

Reuters was unable to immediately confirm whether the video was made by the suspect, whose face does not appear in it. It records a male voice arguing with police over the incident.

The Confederate flag is a racially charged symbol for its association with the pro-slavery South in the U.S. Civil War.