A Houston police officer is credited with staying calm after a naked man sprayed him with pesticide and slapped him in the face.

Video shows Keith Dean, 49, spraying HPD Officer P. Fenaglio from a MetroRail train.

WATCH: Naked man Tased after slapping HPD officer

When the officer pushes the spray hose away, Dean slaps him in the face.

Fenaglio Tased Dean and he fell to the ground. When he got back up, he was Tased again and handcuffed.

“What’s going on, buddy?” the cop is heard asking Dean. “Stay down, stay down.”

Video of the incident posted on YouTube had nearly 10,000 views by Monday evening. Viewers gave the officers involved “thumbs up” for their actions.

“What a good cop,” one person wrote.

“For real,” another added. “Patience of Job. We need more cops like that.”

Keith Dean is charged with assault on a public servant. (HPD) 

Even Dean’s lawyer told KHOU 11 News the officers were “very professional.”

“What you saw in that instance was typical HPD,” Houston City Councilman Mike Knox, a former Houston police officer said. “That’s what they do day in and day out nine times out of ten.”

Knox, who spent nearly two decades on the force, said every HPD officer goes through a required 40 hours of in-service training to learn reason, logic and de-escalation techniques.

In the video, the officers first tried talking to the man before snatching his pesticide sprayer. One officer then tried to reason with Dean once more before using a taser.

Knox called it “textbook” taser use.

“(Dean) needed to be controlled and he was,” Knox added. “Once the man was under control, we there was no reason to berate him or give him a hard time.”

Dean was taken into custody and charged with assault on a public servant. He remains jailed on a $5,000 bond.