VICTORIA -- A Parksville man was arrested Tuesday after he was seen acting erratically while carrying a machete in the seaside community.

Oceanside RCMP say they were called to a local restaurant around 4:15 p.m. for reports of a man entering the eatery with a large machete sheathed at his side.

When Mounties arrived, the man had already left the restaurant on foot along Highway 19A.

Police say the man was then located near the municipality's orange bridge. Officers attempted to speak with the man, at which point he unsheathed his machete and began to walk away from the area.

As the man was walking away, Mounties say they attempted to deescalate the situation. However, the man refused to comply with directions, according to police.

"The man then turned on police and was yelling at the officers and encouraging them to shoot him," said Oceanside RCMP in a release Wednesday.

He then took his machete and approached the responding officers, slashing the hood of a nearby police vehicle.

Mounties responded to the situation by deploying a stun gun on the man. After the weapon was used, police say they were able to take the man into custody without further incident. RCMP say neither the man nor responding officers were injured during the arrest.

The 25-year-old Parksville man was then taken to hospital for a mental health evaluation. He was later released form hospital and held in police custody.

"This was a dynamic and dangerous situation involving a multi member response," said Cpl. Jesse Foreman of the Oceanside RCMP.

"I’m proud of the way the officers responded and thankful it ended without any injuries."