DENVER — A man identified by a law enforcement official as the gunman who killed a suburban Denver sheriff’s deputy and wounded four others early Sunday posted repeated online rants against law enforcement in the area.

The law enforcement official told the Associated Press that Matthew Riehl was the man who shot the five deputies and two civilians as the officers responded to a complaint at an apartment in Douglas County. The official had been briefed on the investigation but spoke on condition of anonymity because he was not authorized to discuss the case publicly.

A YouTube user identified as Matthew Riehl posted a YouTube video Dec. 13 calling for the firing of Douglas County Sheriff Tony Spurlock and railing against him in highly personal terms. Riehl wears an Iraq combat veteran hat in the post; a National Guard spokeswoman told KUSA-TV that Riehl served briefly in Iraq.