A naked man who climbed onto a family's car in Delta this week was suffering from a mental health episode, according to police.

The incident unfolded Tuesday evening on Scott Road, where witnesses reported seeing the man walking and spinning in the middle of the street.

Video that was uploaded to social media shows he eventually climbed onto a silver car that had a family with two children inside. At one point, a woman can be seen trying to get the kids out of the vehicle as the man climbs down off the roof.

While the incident was alarming for the family, Delta police said the naked man was also clearly "scared and worried" when officers arrived at the scene. Chief Neil Dubord credited the officers for recognizing he was in a mental health episode and responding accordingly.

“Our officers receive extensive critical incident and mental health intervention training to de-escalate people who may be experiencing a crisis in their lives, whether that is related to mental health or other factors,” Dubord said in a statement. “This situation was a bit different as it occurred in a very public manner, but this peaceful resolution is reflective of the type of work our officers do regularly.”

Though the video didn't capture the officers' arrival, the Delta Police Department said they spoke to the man in a calm voice and convinced him to sit down on the median, where they put him in handcuffs without resorting to force.

He was ultimately taken into custody under the Mental Health Act and brought to hospital.

The family was "doing well" when officers checked up on them, and none of them were injured during the encounter, according to police.