By Brian Maass

DOUGLAS COUNTY, Colo. (CBS4)– The man who shot and killed a Douglas County deputy spent hours videotaping himself and posting to social media in the hours leading up to the shooting. He also taped the violent confrontation that left Douglas County Sheriff’s Deputy Zackari Parrish dead.

Four other lawmen were also wounded in the ambush and two civilians were also hurt.

Suspect Matthew Riehl also died in the shootout with SWAT officers.

Prior to his death, Riehl recorded hours of his own rambling and incoherent conversations and uploaded them to social media.

CBS4 has reviewed the videotapes.

Riehl, wearing a University of Wyoming beanie, seems to talk to himself and social media viewers in disjointed, nonsensical diatribes.

He apparently contacted police regarding domestic problems with another man who Riehl identifies on tape as his “domestic partner.”

When two deputies initially arrive at Riehl’s door, the entrance is barricaded by a chair. But Riehl shouts at police,”I’m coming out. I don’t have any guns on me.”

Douglas County deputies quietly try to talk to Riehl who demands a restraining order against his domestic partner claiming, “I was assaulted.”

But Riehl quickly ends the conversation and goes back into his apartment telling deputies “Go away” saying he wanted the “civil division.”

When deputies later return, Riehl again talks to at least one deputy through a closed door. The suspect can he heard asking the deputy,”What’s your name?” then opens fire immediately and numerous shots can be heard.

“Get the F out of here… Get out, leave me alone… Why are you here? You don’t have a warrant,” shouts Riehl before unleashing another volley of shots.

“They broke my door… they broke my door in… Why?” shouts Riehl. “Leave me alone… leave me alone,” he repeats. “I said go away. I pay rent. I want civil. Get me civil. Look what they did to my door.”

“Where’s the warrant?” Riehl continually shouts, “Where’s your warrant?”

At this point, Riehl is aware he has shot Deputy Parrish.

“I pay rent… I pay rent!” shouts Riehl. “Look what they did to my door… somebody’s dead out there,” he shouts.

At this point, Riehl can be seen wearing a gas mask and his words are more muffled.

“You broke in, you’re dead,” said Riehl. “I told you, where’s your warrant, where’s your warrant?”

Several people who saw the video livestreamed notified both law enforcement and the social media website and the videos have since been taken down.

CBS4 Investigator Brian Maass has been with the station more than 30 years uncovering waste, fraud and corruption. Follow him on Twitter @Briancbs4.