Mr. Kinner, of Los Angeles, was charged with multiple felony counts of battery and injury to a child. Mr. Kinner has not cooperated with the authorities, officials said.

Image Timmy Kinner, 30, has not cooperated with officials, the police said. Credit... Ada County Sheriff's Office

He has an extensive criminal history spanning multiple states, including a prison sentence in Kentucky, Chief Bones said.

Court records show that a Timmy Kinner born in 1988 has faced multiple charges in Tennessee in recent years, and since 2012 has been convicted of assault, aggravated assault, a weapon offense and unlawful possession of a controlled substance.

He had been in Idaho a short time, the police said. A resident of the apartment complex had allowed Mr. Kinner to stay at her apartment after he said he needed a place to go, Chief Bones said.

But he said that Mr. Kinner was asked to leave on Friday, after residents became concerned about his behavior. It was not immediately clear what happened before he was asked to leave.

Mr. Kinner left peacefully, but returned to the complex on Saturday night for vengeance, Chief Bones said, “not just on those that he had been with, as they were not at the apartment, but at any target which was available.” The birthday party was “just a few doors down” from where Mr. Kinner had stayed, he added.

The police said Mr. Kinner initially targeted the children, before adults tried to intervene.

Saad Mahamoud, 21, said he was coming home from a shopping mall when he pulled into the apartment complex and saw a woman screaming, carrying a small child who appeared to have been stabbed. He said he put the girl in his car and raced her to the hospital.