Police questioned and later released several people in connection with the shooting of two Missouri police officers early Thursday at a protest outside the Ferguson police headquarters, after a top law enforcement official said it was only "by God's grace" that the two cops were expected to survive.

"Lucky," St. Louis County Police Chief Jon Belmar said at a news conference hours after the early morning shootings. "By God's grace we didn't lose two officers last night."

The police officers, not members of Ferguson's force, were part of a 25-man police line at the embattled headquarters, where Ferguson Police Chief Thomas Jackson had announced his resignation hours earlier. Witnesses reported hearing as many as four shots and seeing the flash of a muzzle about 125 yards away from the police.

Hours after Belmar spoke, police swarmed a home in Ferguson four blocks west of the scene of the shooting, according to the St. Louis Post-Dispatch. Officers went in with dogs about 9:30 a.m., and a neighbor told the paper he saw police bring two men out of the home. A woman who neighbors said rents the home was also reportedly brought out in handcuffs.

More On This...

The police officers, one a member of Belmar's force and the other from another county police department, were both released from the hospital late Thursday morning. The officer who was shot in the face will have to return at a later date for a further evaluation. Attorney General Eric Holder, who had ordered an investigation of the Ferguson police department after a racially-charged shooting last August, condemned the shooting of "two brave law enforcement officers" as "inexcusable and repugnant."

"We wish these injured officers a full and speedy recovery," Holder said in a statement. "We stand ready to offer any possible aid to an investigation into this incident, including the department's full range of investigative resources."

Holder later called the shooter a "damn punk."

In amateur video of the shooting scene viewed by The Associated Press, two shots ring out and a man is heard screaming out in pain. Someone at the scene, unseen and unidentified in the video, says: "Acknowledgement nine months ago would have kept that from happening."

The protest began at about 5:30 p.m., after Jackson stepped down. His resignation came after months of controversy and a grand jury decision and a separate Justice Department report that cleared a white former Ferguson police officer, Darren Wilson, of civil rights charges in the shooting of black 18-year-old Michael Brown in Ferguson last summer. Wilson has since resigned. A separate Justice Department report found a profit-driven court system and widespread racial bias in the city police department.

Brown's family issued a statement Thursday condemning the shooting. 

"We reject any kind of violence directed toward members of law enforcement," the statement read. "It cannot and will not be tolerated."

Mayor James Knowles III announced Wednesday that the city had reached a mutual separation agreement with Jackson that will pay Jackson one year of his nearly $96,000 annual salary and health coverage. Jackson's resignation becomes effective March 19, at which point Lt. Col. Al Eickhoff will become acting chief while the city searches for a replacement.

Jackson had previously resisted calls by protesters and some of Missouri's top elected leaders to step down over his handling of Brown's shooting and the weeks of sometimes-violent protests that followed. He was widely criticized from the outset, both for an aggressive police response to protesters and for his agency's erratic and infrequent releases of key information.

The acting head of the Justice Department's civil rights division released a statement saying the U.S. government remains committed to reaching a "court-enforceable agreement" to address Ferguson's "unconstitutional practices," regardless of who's in charge of the city.

A U.S. law enforcement official said Wednesday the Justice Department had not pressured or encouraged Jackson to resign during meetings with him, but had also not resisted the idea. The official spoke on condition of anonymity because of the ongoing meetings between the Justice Department and the police department.

The resignation was welcomed by state lawmakers who represent Ferguson.

"There would be a lot of people that would approve of that," said Democratic state Rep. Sharon Pace, who represents the neighborhood where Brown was shot.

Jackson oversaw the Ferguson force for nearly five years before the shooting that stirred months of unrest across the St. Louis region and drew global attention to the predominantly black city of 21,000.

In addition to Jackson, Ferguson's court clerk was fired last week and two police officers resigned. The judge who oversaw the court system also resigned, and the City Council on Tuesday agreed to a separation agreement with the city manager.

Fox News' Edmund DeMarche, Garrett Tenney and The Associated Press contributed to this report.