ST. MARYS -- Both Stratford and Waterloo regional police were called to a scene at a residence in St. Marys on Monday afternoon.

Stratford officials say they first responded to an incident at a home on Thomas Street around 4 p.m.

In a release issued Tuesday afternoon, Stratford police said they received a Notice of Apprehension from the Ontario Court of Justice.

Stratford police said that notice authorized them to apprehend a 52-year-old St. Marys man under the Mental Health Act and transport him to a hospital for assessment.

According to the release, officers attended the residence and located the man shortly after 4:30 p.m. The man allegedly "became escalated" and threatened to kill officers while holding a knife.

Stratford police said officers did not enter the residence and began negotiations "in an attempt to de-escalate the situation."

Waterloo regional police’s tactical and K9 unit were called in early Tuesday morning.

The man was "safely apprehended" and transported to hospital around 9:30 a.m. on Tuesday after about 17 hours of negotiations, Stratford police said.

Stratford police said a mental health clinician from the Huron-Perth Health Alliance also assisted with the incident.

Neighbours told CTV News a man inside the home became agitated on Monday, which prompted a police response and began what turned out to be an 18-hour barricade situation.

"I think the whole community is hopeful that he'll get the help he needs so it doesn't happen again," said neighbour Tracey Polidoro. "It didn't escalate to the point where anyone got hurt, so that's the good thing."

A 52-year-old man is charged with uttering threats, assault with a weapon and possession of a weapon for a dangerous purpose. He is due in court Nov. 22.