The man who shot five Douglas County Sheriff’s Deputies, killing one, on Sunday morning was an Iraq War veteran and an attorney that had been harassing local law enforcement with threatening emails and even YouTube videos in the weeks leading up to the attack.

Matthew Riehl, 37, served in the Wyoming National Guard from 2006 to 2012, and deployed to Iraq in 2009 with 300th Field Artillery Regiment. He received an honorable discharge in 2012 as an E-4 (Specialist). He had recently participated in an eight hour firearms training course conducted by Kenaz Tactical Group in Colorado.

On Sunday morning, five Douglas County Sheriff’s Deputies approached Riehl’s apartment, responding to a call about a domestic disturbance, when he opened fire, hitting all five in rapid succession and killing one, Zackari Parrish, a 29-year-old father of two. The other injured deputies are all currently listed in stable condition. Two civilians were also wounded in the shootout, though their injuries were characterized as “non life threatening.” Riehl was ultimately killed in the firefight.

Police have yet to reveal any information they may have regarding the motive for Sunday’s incident, but it has recently been revealed that Riehl had been sending harassing messages to local law enforcement entities, and even posting some on social media platforms like Facebook and YouTube. Riehl’s Facebook account, which has since been deactivated, also contained a number of memes and shared images that have been attributed to “Alt-Right” groups and white nationalists.

Riehl’s harassment of law enforcement officers reportedly began after a November traffic stop in the nearby Denver suburb of Lone Tree. Riehl began posting harassing messages on social media and sending emails to officers, prompting the Lone Tree police to notify the Douglas County Sheriff’s Office.

“At that point, the Lone Tree Police Department immediately contacted the Douglas County Sheriff’s Office to investigate, given that a Lone Tree police officer was being targeted by the suspect’s harassing communication,” said Lone Tree spokeswoman Denisse Coffman.

This wasn’t the first time Riehl had drawn the attention of law enforcement for his online activities. In 2017, the University of Wyoming, where Riehl earned his law degree, alerted law enforcement after he began writing posts that involved the college that were “outrageous, vulgar and alarming,” according to Chad Baldwin, associate vice president for communications and marketing at the university. Law enforcement reportedly interacted with Riehl briefly at the time, but he did not face charges.

In the video below, posted by Riehl earlier this month, the troubled man accuses a local Sheriff’s office of “being run by a pimp,” and one deputy of being “a pimp in the field,” before claiming that he is running for “libertarian candidate,” seemingly for sheriff himself.