DES MOINES, Iowa (AP/USA TODAY) - Police say they have captured the man suspected in the ambush killings of 2 Des Moines area officers.

The suspect in the back-to-back killings was identified as 46-year-old Scott Michael Greene, said Urbandale police spokesman Sgt. Chad Underwood. Before his capturing, police had described Greene, who was last seen driving a blue Ford F-150 with an Iowa license plate, as armed and dangerous.

Court records that he has had previous encounters with Urbandale police officers.

Greene was taken into custody by the Dallas County Sheriff's Department while walking along a rural road in Redfield, about 35 miles west of where the shootings occurred.

Greene flagged down a passing Department of Natural Resources officer, handed over his ID and told the officer to call police, police said. No shots were fired and there was no struggle. The suspect was taken by ambulance to a Des Moines hospital with an unknown injury.

In a late morning news conference, police identified the slain officers as Urbandale Police Officer Justin Martin and Des Moines police Sgt. Anthony "Tony" Beminio.

The attacks began around 1:06 a.m. CT, when police departments from both cities responded to reports of gunfire at the intersection of 70th Street and Aurora Avenue in Urbandale.

The first officers arriving on the scene found Martin fatally wounded.

About 20 minutes later, some two miles away, Beminio was shot near the intersection of Merle Hay Road and Sheridan Avenue while responding to reports of the first officer's shooting. Beminio was transported to Iowa Methodist Medical Center, where he died.

Scott Michael Greene

Both officers were gunned down in their patrol cars.

"It doesn't look like there was any interaction between these officers and whoever the coward is that shot them while they sat in their cars," a visibly emotional Parizek told reporters.

"In all appearances it looks ... that these officers were ambushed," he added.

Des Moines police, fearing officers were being singled out, paired up its patrol officers so none were on the street alone, Parizek said. "There's literally a clear and present danger if you're a police officer," he said.

Police did not offer many details on how investigators identified Greene as a suspect. Underwood said he was identified "through a series of leads and a series of investigative tips."

In April 2014, according to court records, Greene was charged with a simple misdemeanor count of interference with official acts for resisting an attempt by officers to pat him down for weapons at an Urbandale residence. The officers wanted to search Greene after noticing that he had a pouch on his belt that resembled a holster.

Greene was “noncompliant, hostile, combative and made furtive movements toward his pockets” before the arrest, Officer Chris Greenfield wrote in the complaint. Greene pleaded guilty to the charge about two weeks later.

The complaint does not indicate why officers initially came into contact with Greene. But two days later he reportedly threatened to kill a man in the parking lot of the same apartment complex and he was charged with first-degree harassment, according to another complaint.

In that incident, Greene was accused of approaching a man in the parking lot and shining a flashlight in his eyes. Greene, who lived in the apartments, called the man the N-word and told the man “I will kill you, (expletive) kill you,” according to the complaint. Greene pleaded guilty to a lesser harassment charge on June 30, 2014, and was sentenced to one year of probation.

In a discharge report filed in June 2015 a probation officer wrote that Greene had received a mental health evaluation and “reports to have complied with the medication recommendations.”

Attorney General Loretta Lynch condemned the killings, saying “violence has no place in the United States of America.’’

“Let me be clear, there is no message in murder,’’ the attorney general said, referring to simmering distrust between law enforcement and many communities across the country. “Violence creates nothing; it only destroys.’’

PHOTOS: 2 officers killed in Iowa

It's the first time Des Moines has seen a police officer shot and killed in the line of duty since two officers were gunned down in separate incidents in 1977.

Two Des Moines officers, Susan Farrell and Carlos Puente-Morales, died earlier this year when their vehicle was struck head-on by a wrong-way drunk driver.

The killing of the Urbandale officer appeared to be the city's first for an officer shot in the line of duty, Underwood said at the news conference.

Parizek thanked the community for its support when the department lost Farrell and Puente-Morales, as well as with the latest tragedy.

"I don't even know where to begin on how bad this year is," he said. But, "this is what we do. We come in day in and day out, we go out there and provide the same level of service regardless of what's going on in our personal and professional lives."

In a statement, Iowa Gov. Terry Branstad called the attack on the officers "an attack on the public safety of all Iowans."

"We call on Iowans to support our law enforcement officials in bringing this suspect to justice," he said. "Our thoughts and prayers go out to the families of the police officers who were tragically killed in the line of duty as well as the officers who continue to put themselves in harm's way."

Iowa Sen. Joni Ernst extended her thoughts and prayers to the families of the officers killed.

"Although the investigation is still unfolding, what appears to be an ambush attack of police in the line of duty is an attack on the community at large and all of the men and women who risk their lives every day to protect us," Ernst said. "This was a senseless act of violence and it cannot be tolerated."

Finney and Haley report for The Des Moines Register. Follow them on Twitter: @newsmanone and @charlyhaley Stanglin reports for USA TODAY in McLean, Va.

Stay updated on this and other stories by downloading the FREE 13News Now app now in the iTunes store or on Google Play.