A New York man wearing military gear who barricaded himself inside a home after a dispute with his wife – and then posted updates on social media – surrendered Saturday night after a seven-hour standoff, authorities said.

Comments from Instagram followers only made the situation worse, police said, according to News 12 in Westchester County, north of New York City.

IOWA MAN CHARGED IN POLICE STANDOFF TELLS JUDGE, 'I AM JESUS'

“This is a person in crisis, having mental illness, having issues and he didn't need the people on social media telling him that his rights are being violated,” Chief Michael Cazzari of the Carmel Police Department told the station. “He needed help. Medical help.”

Police were called to the scene in Mahopac, part of Carmel, in Putnam County, around 2 p.m., WNBC-TV of New York City reported. Sources told the station the suspect suffers from post-traumatic stress disorder (PTSD), though it was unclear whether he had served overseas.

Negotiators were aware of the suspect’s mental condition as they tried to convince him to surrender, according to the station.

CLICK HERE TO GET THE FOX NEWS APP

The suspect ultimately surrendered peacefully around 9:30 p.m., News 12 reported.

Separately, a state trooper was grazed by a bullet during an unrelated seven-hour standoff in September with a man in Wappinger, Putnam County. That incident also was sparked by a domestic dispute, the Putnam Daily Voice reported.