On Thursday, Greene was arrested and charged with two counts of murder after authorities found enough evidence to buttress the charges, police said.
Investigators believe Scott Michael Greene, 46, shot Urbandale police Officer Justin Martin and Des Moines police Sgt. Anthony "Tony" Beminio while they sat in squad vehicles at intersections roughly 2 miles apart shortly after 1 a.m., authorities said.
When police arrested him Thursday, Greene was placed in the handcuffs belonging to both officers, authorities added.
He had been the prime suspect since.
Urbandale police said they had interacted with Greene before, including about two weeks ago, when they told him to leave a high school football game.
But Des Moines police Sgt. Paul Parizek said there was nothing to immediately indicate that Martin or Beminio had any previous contact with him.
Nor did it appear the officers had much warning someone was about to shoot them, Parizek added.
'These guys were ... doing nothing wrong'
Police discovered Martin's body about 1:05 a.m., after residents reported shots being fired. Martin's body was seated in his squad car, at an Urbandale intersection just northwest of Des Moines, Parizek said.
Twenty minutes later, as officers responded to the Urbandale shooting, Beminio was found shot in his squad vehicle, at an intersection in Des Moines.
Beminio died at a hospital, Parizek said. He said both officers were on patrol. Neither was responding to a service call, and neither had radioed about a confrontation.
"In all appearances it looks ... that these officers were ambushed," Parizek said Wednesday.
"These guys were gunned down sitting in their car, doing nothing wrong."
Investigators believe "over 15 and under 30" shots were fired at Martin alone, Urbandale police Chief Ross McCarty said.
Greene told to leave game after waving Confederate flag, police say
Urbandale police had asked Greene to leave a high school football game about two weeks ago, prompting him to complain that police were infringing on his rights, McCarty told reporters.
Greene was asked to leave after he waved a Confederate flag in front of "people of color" during the national anthem, and other people complained it was offensive, McCarty said.
"He said he was invoking his First Amendment rights, and we were trampling on them," McCarty said.
Greene left school property but used public sidewalks to "continue his demonstration," McCarty said.
Police warned Greene to "cease and desist," and he afterward was negotiating with the school about when he'd be permitted at the school, which his daughter attends, the chief said.
Greene is white, as were Martin and Beminio, police said.
Investigators don't know of a motive in Wednesday's shootings, Parizek said.
Tearful embrace as Des Moines area mourns again
The shootings bring renewed pain to a community that recently mourned the deaths of two other Des Moines police officers. They were killed in March when their vehicle was hit head-on by a driver going the wrong way, police said.
As news of the shootings spread, a woman gave bottled water and other supplies to an Urbandale police officer who was standing along a street, and tearfully gave him a hug, video from CNN affiliate KCCI showed
"I want you to go home to your families, because I want my dad to come home to me and I want my friends to come home to me, and I'm sorry," she said.
'A great friend to a lot of us'
Parizek, the Des Moines police spokesman, choked up as he spoke of Beminio, an 11-year veteran of the force who once worked under Parizek's patrol.
Beminio, married with children, had been a school resource officer and a robbery homicide detective, and was recently promoted.
"A great friend to a lot of us," Parizek said.
Martin, 24, had just finished academy and field training this year, McCarty said.
"We had high expectations (for) his future, and it's tragic it's been cut short," the chief said.
The Urbandale Police Department, a force of about 50 officers, said it believes this is the first officer it has lost in the line of duty.
Highest number of officers shot dead since 2011
Wednesday's deaths bring to at least 52 the number of police officers fatally shot in the line of duty in the United States and Puerto Rico in 2016, according to the National Law Enforcement Officers Memorial Fund
. That's the highest one-year total since 2011, when 73 were shot dead, the fund says.
They also come just months after two high-profile deadly surprise attacks against police officers in Texas and Louisiana.
On July 7, a gunman shot and killed five police officers in Dallas
during a protest of controversial police shootings of black men in other states. The Dallas shooter, who police subsequently killed, said he was upset with the other shootings, police said.
On July 17, gunman Gavin Long shot six law officers, killing three
, in Baton Rouge, Louisiana, police say. A SWAT officer subsequently shot and killed Long.
Long apparently visited Dallas after the shootings there, posting a YouTube video July 10 in which he spoke of the protests, and a notion that victims of bullying need to resort to brute force.
The Baton Rouge and Dallas shootings came after the controversial shooting deaths of two black men by police officers, Alton Sterling in Baton Rouge
on July 5 and Philando Castile in Minnesota
a day later. The shootings spurred protests across the country.