Steve Pope/Getty Images Officers stand guard outside the home of alleged gunman Scott Michael Greene in Urbandale, Iowa, on Nov. 2, 2016.

A police K-9 unit has tracked down the gun used to kill two unsuspecting Iowa police officers, finding the weapon in a remote wooded area “where no person probably could have found it,” police spokesman Sgt. Paul Parizek said Thursday.

With the discovery of the gun and with suspect Scott Michael Greene in custody, most of the pieces are now in place for a full investigation of the killings of Urbandale Police Officer Justin Martin and Des Moines Police Sgt. Anthony Beminio ― but one thing remains elusive: a motive.

Green, 46, reportedly turned himself in after the fatal shootings. Those closest to him describe him as a “loner” who took his recent divorce and the death of his father hard, according to The New York Times. He has since been accused of racism, harassment and abuse, and has had multiple run-ins with law enforcement.

Any one of those incidents could have led Greene to target the two police officers.

Greene has had several run-ins with police over the past two decades. In 2001, he was charged with assault, but the charge was later dropped. After approaching a man and threatening to kill him in April 2014, he was charged with misdemeanor harassment, according to Iowa court records.

Urbandale police also confirmed that weeks ago, they’d escorted Greene out of a football game at his daughter’s high school. He was reportedly waving a Confederate flag at black students there.

A YouTube video, apparently shot at the high school, shows a man filming police officers who are asking him to leave. (Martin and Beminio do not appear in the video.) The footage was posted on YouTube by an individual named Scott Greene, who later wrote in a comment that he was “offended by the blacks sitting through our anthem.”

Greene also appears to have a troubled relationship with his family. Hours prior to the shootings on Wednesday, a court ordered him to move out of his mother’s house after she accused him of emotional and physical abuse, according to Times.

The 46-year-old was hospitalized after his arrest for what authorities called a pre-existing medical condition, was released on Thursday and charged with two counts of first-degree murder, Polk County prosecutors told The Huffington Post.

Des Moines and Urbandale police didn’t immediately respond to calls for comment. But at a press conference on Thursday, Des Moines Police Chief Dana Wingert called the deaths of Martin and Beminio a “cowardly act of calculated murder.”

“Plain and simple, that’s the reality,” Wingert said. “If someone wants to argue that reality with me, my office is two doors down.”