This undated photo provided by the Des Moines Police Department shows Scott Michael Greene, of Urbandale, Iowa. Des Moines and Urbandale Police said in a statement Wednesday, Nov. 2, 2016, that they have identified Greene as a suspect in the killings early Wednesday morning of two Des Moines area police officers. The two officers were shot to death in separate ambush-style attacks while they were sitting in their patrol cars. (Des Moines Police Department via AP)

IOWA CITY, Iowa (AP) – Days before he allegedly killed two Iowa police officers, Scott Michael Greene sent a note to one of their departments praising officers for their service and calling them “absolute heroes.”

In an online compliment form addressed to the “many officers” of the Urbandale Police Department, Greene wrote on Oct. 29 that he loved them for keeping the community safe.

He apologized for prior run-ins with his hometown department and said that his “dark days” were over because he was getting treatment for post-traumatic stress disorder.

Four days after the laudatory email, authorities say Greene shot and killed Urbandale police officer Justin Martin and Des Moines Police Sgt. Antony Beminio in ambush-style attacks while they sat in patrol cars.

The Associated Press exclusively obtained the document Thursday under open records law.