BATAVIA, N.Y. (WKBW) — A man who engaged in a standoff with police for nearly 20 hours has come out of his Batavia home on his own.

Came out on his own. Man is being taken to medical facility. — Jeff Slawson (@Jeffslawson) November 19, 2019

The chief of Batavia police made the announcement just after 9 a.m. State troopers had re-established contact with the man around 8:30 a.m. They had not heard from him since placing a flashbang inside the home. It went off around 6 a.m.

On scene of a standoff in Batavia. It’s been going on since 1:30p yesterday. The man involved has threatened people with a sword https://t.co/5LgTrFX3iu @WKBW pic.twitter.com/PnQp64lUfA — Jeff Slawson (@Jeffslawson) November 19, 2019

The standoff began between 1 and 1:30 p.m. Monday following some sort of domestic incident. Police said a woman was able to exit the apartment uninjured before officers created a converged on the home.

For hours and hours, police said the man refused to comply with all commands. They also said he displayed a sword and also fired some sort of BB or pellet gun at officers. A warrant was later issued for his arrest. He has yet to be identified by police.

The standoff has had a ripple effect for neighbors. Those who live directly next door were evacuated from their homes to other neighboring homes further away from the scene, according to the assistant chief. People living inside around a dozen other homes on the block were directed to shelter-in-place with doors and windows locked until the situation is resolved.

The home is located less than half a mile from Jackson Primary School. School began as normal Tuesday morning with an increased police presence. The standoff resulted in a lockdown Monday afternoon. Students were able to be dismissed safely just after their normal time. 7 Eyewitness News has yet to see any message from Batavia City Schools regarding the situation on the district website.

State troopers and multiple county sheriff's offices have been assisting Batavia Police, including emergency response teams from Genesee, Orleans and Monroe counties. Police said officers were rotated out to keep them rested, fed and warm.