One officer was grazed in the head, he said.

The city’s mayor, Jim Kenney, said that he had spoken with all six officers at the hospitals and that they were in good spirits. He said that seeing the young sons of the officer who was grazed by a bullet made him realize how their lives could have changed drastically had things gone a little differently.

“Just a little bit more and those two will grow up without their dad,” Mr. Kenney said during a news conference at about 10 p.m.

Mr. Kenney, a Democrat, used the spotlight of the standoff to push for tougher gun control measures and admonished policymakers for their lack of action.

“Our officers need help, they need help with gun control,” Mr. Kenney said. “They don’t deserve to be shot at with an unlimited supply of weapons and unlimited supply of bullets.’’

“This government,’’ he said, “both on the federal and the state level, don’t want to do anything about getting these guns off the streets and getting them out of the hands of criminals.”

One officer who was injured in an accident while responding to the standoff was admitted to the hospital for what the authorities described as non-life-threatening injuries.