A 46-year-old Iowa man accused of ambushing and killing two police officers early Wednesday morning has been arrested, authorities say.

Officers had been searching for Scott Michael Greene, of Urbandale, who was considered to be armed and dangerous, police told the Des Moines Register.

He was arrested in Dallas County, Iowa, about 9:30 a.m. local time, about seven hours after the shootings, KCCI-TV reports.

The slain officers have been identified as Urbandale Police Officer Justin Martin and Des Moines Sergeant Anthony “Tony” Beminio.

They were killed in two shootings about 20 minutes apart in Urbandale and Des Moines, police say.

“It doesn’t look like there was any interaction between these officers and whoever the coward is who shot them while they sat in their cars,” Des Moines Police Sergeant Paul Parizek said at a press conference.

The officers’ patrol vehicles were riddled with bullets. Police said in radio dispatches that it is believed a rifle was used in the shootings.

Here’s what you need to know:

1. Scott Greene Clashed With Cops Last Month After Being Kicked Out of a Football Game for Flying a Confederate Flag During the National Anthem

A man named Scott Greene, who matches the description of the suspect, recorded himself being kicked out of a football game in Urbandale, Iowa, on October 14, 2016.

The Urbandale School District confirmed to the Des Moines Register that a man named Scott Greene was removed from the football stadium that day. The stadium is at the same intersection where the Urbandale police officer was killed Wednesday morning, the newspaper reports.

Greene also posted a 10-second video featuring only a still photo showing him in the stands of the high school holding American and Confederate flags. You can see that photo above.

In the comments of one of the videos, Greene wrote, “I was offended by the blacks sitting through our anthem. Thousands more whites fought and died for their freedom. However this is not about the Armed forces, they are cop haters.﻿”

He titled the second video, which you can watch below, “Police Abuse, Civil Rights Violation at Urbandale High School.”

Police Abuse, Civil Rights Violation at Urbandale High School 10/14/16This is an assault on a person exercising his constitution rights on free speech! 2016-10-16T21:59:18.000Z

“This is an assault on a person exercising his constitution rights on free speech!” he wrote in the description.

The 10-minute video shows Greene after he was removed from the stadium, interacting with Des Moines and Urbandale police officers who are trying to get him to leave the area.

It begins with officers telling Greene to leave for “committing a disturbance in the stands.” He asks them repeatedly, “Have I committed a crime?”

He also accuses an officer of “assaulting” him by “grabbing” him and “shoving” him around.

Daybreak gives us a better look at DMPD squad car. Police say 46 yr old Scott Michael Greene ambushed and killed two officers @WHOhd pic.twitter.com/Njyu75yywJ — Jodi Whitworth (@JodiWhitworth_) November 2, 2016

Greene also says he was assaulted in the stands and had a flag stolen from him.

“I’m a citizen of the United States of America and I would like my property back that was stolen from me,” he says. “I want to report the theft of property from myself. I was actually assaulted. I would like to report an assault.”

The officer then directs him to a public sidewalk off of the high school property.

“Someone behind me hit me and they stole, it was almost like a mugging, because I had my property and I was holding it and they stole it from me,” Greene tells an officer.

He said he was standing there “holding a flag,” during the National Anthem, when he was attacked by “African-American people” behind him, who took his flag. He tells the police he wants to press charges.

An officer tells Greene the flag he was holding, a Confederate flag, is in violation of school code.

“You came just to fly the flag and possibly cause a disruption tonight,” an officer says. “You have to understand in the current social climate we’re in, when you fly a Confederate flag standing in front of several African-American people, that’s going to cause a disturbance, whether you intended to or not.”

Greene argues that it is his Constitutional right to do so and says he was “peacefully protesting.”

2. Greene Called a Man at His Apartment Complex the ‘N-Word’ & Threatened to Kill Him in 2014, Court Records Show

On the scene where an officer was found shot at Merle Hay road and Sheridan dr early Wed. morning. pic.twitter.com/KupgOHWr6O — Brian Powers (@bpowersphoto) November 2, 2016

Greene has been arrested numerous times, online court records show.

According to the Des Moines Register, he was convicted of harassment in 2014 after police said he approached a man in the parking lot of his apartment complex, shined a flash light in his eyes and called him the “N-word.” Greene then told the man, “I will kill you, (expletive) kill you,” according to records.

He was sentenced to one year of probation. A probation discharge report filed in June 2015 shows that Greene received a mental health evaluation and “complied with the medication recommendations,” according to the newspaper.

Greene was convicted of interference with official acts in 2014 after resisting officers’ attempts to pat him down for weapons at the same apartment complex, the Des Moines Register reports. According to the police report, the officers wanted to search Greene after noticing a pouch similar to a holster on his belt.

Officer Chris Greenfield wrote that Greene, was “noncompliant, hostile, combative and made furtive movements toward his pockets,” according to the Register.

He was also arrested in 2001 and charged with domestic assault, assault causing bodily injury and fourth-degree criminal mischief. He was also charged in 2010 with driving under the influence. The charges in those cases were all later dismissed, according to court records. Other details about the cases were not immediately available.

Police were recently called to the home of Patricia Greene, Scott’s mother, for a domestic disturbance, and arrested Patricia after her son said she assaulted him, the Associated Press reports.

According to the criminal complaint obtained by the AP, Scott Greene told police his 66-year-old mother yelled at him on October 17, telling him to remove his daughter’s service dog from the house. Scott Greene told police he was wearing his deceased father’s dog tags, and his mother tried to tear them from his neck. Police said Scott Greene grabbed his mother’s hand and she scratched his face.

Scott Greene recorded video of the incident and showed it to police, leading to her arrest. She was released after posting $1,000 bail and is due in court later this month, according to the Associated Press. She was also ordered not to have contact with her son.

Patricia Greene appears to have been referencing her troubles with her son in a Facebook post Tuesday night, ”

“I can’t believe the love and kindness you are all showing me. With friends and relatives like all you guys, how could a girl ever go wrong. Things are looking up but, please don’t stop your prayers. They are still needed.”

3. His Daughter Posted a Photo to Facebook Saying #Scott’sLifeMatters After the Shootings, Saying He Was ‘Very Sick Mentally’

Des Moines police identify suspect wanted in connection to two police officers shot, killed in ambusOfficials have launched a statewide manhunt for the suspect, who has been identified as 46-year-old Urbandale resident Scott Michael Greene. Greene was last known to be driving a blue 2011 Ford truck. He is believed to be armed and should be considered dangerous, according to the Des Moines and Urbandale police departments. ◂ The ABC… 2016-11-02T14:22:00.000Z

Greene, a father of three originally from Iowa, filed for bankruptcy in 2007, according to federal court records.

He lists a daughter and two sons as dependents in the filing. He also says he was working at an office furniture store and previously worked for a boating company.

A recent video on his Youtube account indicates he was fired from a job with a fencing company.

“First day on the job, 5 ton truck, pulling skid loader on trailer and driving 75mph down a gravel road. I was fired after reporting this to the owner,” he wrote in the caption of the video, which shows him filming as another man drives a truck.

He posted the video, which you can watch below, on October 27, but it’s not clear when it was recorded.

Central Iowa FencingFirst day on the job, 5 ton truck, pulling skid loader on trailer and driving 75mph down a gravel road. I was fired after reporting this to the owner. 2016-10-27T11:03:59.000Z

His daughter, Sammie Greene, posted a photo of Greene to Facebook with #Scott’sLifeMatters after the shooting, sparking angry comments.

“He was also a loving father grandfather and the greatest man I know. He was very very sick mentally,” she wrote. “Evil succumbed him and he made the up worst mistake. Now he will have to live with that for the rest of his life. But I will never turn my back on this man.”

“This poor man was consumed by the devil himself this morning. I will continue to pray for him. Along with the families of the officers,” she wrote.

Scott Greene’s Facebook page does not include any public photos or details about his life. One post from from 2014, about child abuse, is visible:

I have been surrounded by stories of sexual abuse toward children and I am fed up with the predators that lurk in our communities. It seems that nearly all of my dear friends, family, ex relationships, and peers have a story in their lives about someone being sexually abused as a child. We need to band together as a society and protect our children by all legal means necessary. We cannot turn a blind eye to these little victims that are now scarred for the rest of their lives. Please join me in exposing this sickness that lives among all of us. Do not be afraid any longer to speak out against child abuse, awareness is the key in keeping our preciuos children safe.

Police searched a home where Greene lived in Urbandale after the shooting. At a press conference, officials said he was known to officers.

Neighbors told the Des Moines Register that Greene put a Donald Trump campaign sign on his lawn about two weeks ago.

Neighbor tells me that shooting suspect Scott Michael Greene put this Trump sign in his yard approx 2 weeks ago. pic.twitter.com/8HjtthB51I — Grant Rodgers (@GrantMRodgers) November 2, 2016

Register reporter Grant Rodgers added, “Neighbor also says Greene called police last week about a local burglary, seemed excited by helping law enforcement.”

Trump tweeted about the shooting, saying, “Praying for the families of the two Iowa police who were ambushed this morning. An attack on those who keep us safe is an attack on us all.”

Praying for the families of the two Iowa police who were ambushed this morning. An attack on those who keep us safe is an attack on us all. — Donald J. Trump (@realDonaldTrump) November 2, 2016

His opponent, Hillary Clinton, also tweeted about it, saying, “Heartbroken for the families of two brave officers who were killed in Iowa. There’s no justification for this kind of violence.”

4. He Surrendered to a Police Officer From the Iowa Department of Natural Resources Without a Struggle

The scene of the first shooting at 70th and Aurora where an officer was found shot early Wed morning. Some officers in combat gear here. pic.twitter.com/SJEUY4B3gh — Brian Powers (@bpowersphoto) November 2, 2016

Scott Greene was taken into custody in Dallas County, Iowa, about 9:30 a.m., KCCI-TV reports.

According to WHO-TV, Greene turned himself in to a police officer from the Iowa Department of Natural Resources without a struggle. He was then taken into custody by the Iowa State Patrol and Dallas County Sheriff.

The arrest happened in a rural part of the state, near Redfield, the news station reports. He had been spotted walking on a G Trail, a road in Wiscotta, south of Redfield, police said.

On scene in rural Wiscotta where police arrested suspect Scott Greene, double murder suspect pic.twitter.com/ajn37MBrjT — Jannay Towne (@JannayTowne) November 2, 2016

Redfield is about a 40-minute drive from Des Moines.

He was taken to the hospital for an unknown reason after the arrest, the Des Moines Register reports.

Greene was believed to be driving a blue 2011 Ford F-150 pickup truck with a silver topper (truck bed cover) and a ladder rack, police say. The truck has the license plate 780 YFR, police say.

He was described as being about 5 foot 11 inches tall, weighs 180 pounds and has brown hair and green eyes, according to police.

5. The Officers Were Ambushed & Killed in Their Patrol Cars About 2 Miles Apart

The first officer, Urbandale Officer Justin Martin, was found dead about 1:06 a.m. when police responded to a report of shots fired in the area of 70th Street and Aurora Avenue in Urbandale, Des Moines Police Sergeant Paul Parizek said in a press release.

Responding officers “found an Urbandale Police Department police officer who had been shot.”

Martin was “still seated in his vehicle,” Parizek said at a press conference, “and he’d been shot and killed.”

Parizek said Des Moines officers were called to assist at that scene.

The second officer, Des Moines Sergeant Tony Beminio, was found fatally shot about 1:25 a.m. in the intersection of Merle Hay Road and Sheridan Drive, Des Moines Police said in a statement.

Beminio was found by another Des Moines officer who was in the area assisting in the search for a suspect in the Urbandale shooting, Des Moines Sergeant Paul Parizek said at a press conference.

Beminio was taken to a local hospital, where he later died, Parizek said.

The scene of the second shooting is about two miles away from where the Urbandale officer was killed.

Beminio, 38, had been with the Des Moines Police Department since 2005. He was promoted to sergeant last year. Martin, 24, joined the Urbandale Police Department in 2015.

My cousin Tony Beminio was sergeant with the Des Moines PD. He was killed in cold blood by a coward. Don't make it political. Pray. pic.twitter.com/4yUDYKINOB — Jason (@stlrnhwk) November 2, 2016

Beminio attended Iowa City West High School, where he was a standout football player and wrestler.

Tony Beminio, from the days when the horse-collar tackle was still legal. #CountdowntoKickoff – 79 Days: http://t.co/2ePLLknVf7 — West Football (@ICWestFB) June 12, 2013

Both Beminio and Martin graduated from Simpson College, the university’s student newspaper, The Simpsonian, reported. Beminio graduated in 2001 and Martin in 2015.

Martin grew up in Rockwell City and was an Eagle Scout.

Two metro officers shot and killed overnightDes Moines police confirming that two police officers were shot and killed overnight. Subscribe to KCCI on YouTube now for more: http://bit.ly/QY3wuM Get more Des Moines news: http://kcci.com Like us : http://facebook.com/kcci8 Follow us: http://twitter.com/KCCINews Google+: http://plus.google.com/+kcci 2016-11-02T09:49:13.000Z

Beminio is the third officer to be killed in the line of duty this year, and the first to die by gunfire, according to the Des Moines Register.

Officers Susan Farrell and Carlos Puente-Morales were killed in March when their cruiser was struck head on- in a wrong-way drunken driver, the newspaper reports.

“I don’t even know where to begin on how bad this year is,” Sergeant Paul Parizek said at a press conference. 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.”

Police Officers in Iowa hold news conference on 2 officers shot and killed in ambush-style attacksPolice officers with Urbandale and Des Moines provide an update on two police officers shot and killed in ambush style attacks in Iowa on Wednesday morning. ◂ The ABC Action News app brings you the latest trusted news and information. ABC Action News is Taking Action For You with leading local news coverage, "Certified Most… 2016-11-02T10:39:28.000Z

The Des Moines officer is the first to be shot in the line of duty since two officers were killed in 1977, Parizek said. The Urbandale officer is the first to be fatally shot in the line of duty in the history of the department.

Iowa Governor Terry Branstad’s office said in a press release that he had been briefed on the shooting.

“An attack on public safety officers is 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,” the governor’s office said in a statement. “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.”

The shootings also come in a year when five police officers were killed in Dallas and three officers killed in Baton Rouge in ambush attacks.