YORK, Maine (AP) – A Maine police officer put his nose in harm’s way during a wildlife rescue.

York Police Department officer David McKinnon came upon a skunk with its head stuck inside a cup while on patrol early Sunday.

READ MORE: Basketball Hall Of Famer's Shop With A Cop Program Helps Build Trust Between Police And Kids

He decided to help despite the high risk of a malodorous outcome.

READ MORE: Hundreds Come Out To Honor Fallen Mesquite Officer In Prayer Vigil

He recorded video with his smartphone in one hand and gently tugged on the paper cup with the other hand while speaking reassuringly to the skunk.

Once freed, the skunk lifted its tail in preparation to spray. But it decided instead to scamper away as McKinnon exclaimed, “I never thought in a million years!”

The video had 41,000 views on Facebook as of Wednesday, and McKinnon earned praise for his bravery in the face of a potentially stinky rescue.

MORE NEWS: Oklahoma Hires Clemson's Venables As Coach

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)