A man wielding a chainsaw inside a senior-living facility in St. Charles, Illinois, was shot and killed by police early Sunday, state and local law enforcement said.
The man, whom police have not publicly identified, was allegedly attempting to cut down a tree on the facility's property at about 8:45 a.m. on Sunday. He was "shirtless" when police arrived at the facility, on the 900 block of North 5th Avenue, the St. Charles Police Department said in a press statement.
"Just before police arrival, witnesses advised the subject had now gained entry to the lobby of the building and began confronting residents with the chainsaw," the department said.
Officers sought to deescalate the situation, but "the suspect continued his attempts to use the chainsaw against residents of the building," as well as against responding officers, the department said.
Officers used a taser on the man, "but his attack continued," the press statement said. An officer then fired his gun, striking the alleged attacker, police said.
"The male suspect was transported to an area hospital where he was pronounced deceased," the Illinois State Police said in a press release.
Officers and residents of the assisted-living facility were treated at the scene for minor injuries, police said.
"We are deeply grateful for the swift action of our team and law enforcement," a spokesperson for the facility, the River Glen of St. Charles, said in a statement. "We want to emphasize that our community is secure, and all residents and staff members are safe."
The Illinois State Police said it would investigate the shooting.
ABC News' Maci Smith contributed to this report.