A Hudson man accused of putting a gun to his estranged wife’s head was arrested Thursday after an extensive search that prompted security measures at two schools.

The St. Croix County Sheriff’s Office said the 45-year-old man, whose name was not immediately released, was arrested at 3:40 p.m. Jan. 4 without incident at a home on West Grove Road in the town of Troy.

The sheriff’s office said the man was the suspect in an incident from 11:01 a.m. earlier in the day at a home on LaBarge Road in the town of Hudson. Deputies were called there after taking an emergency call from a woman saying her estranged husband held her against her will and assaulted her. He held a gun to her head, threatening to kill her and himself, according to the sheriff’s office.

The woman got away and called 911 but the suspect was gone by the time deputies arrived.

St. Croix County’s tactical team was brought in for the manhunt that ultimately brought them to the town of Troy home where the suspect lives.

Formal charges could be filed as soon as Friday, Sheriff Scott Knudson said.

The incident led to a modified lockdown at Hudson Prairie Elementary and Hudson Middle School, where the couple’s children attend school, according to the sheriff’s office. The situation brought a heightened police presence to the buildings during dismissal while authorities closed in on the suspect.

The suspect is being held in the St. Croix County jail pending formal charges.