Aerial view of Atlantic City, N.J.

Atlantic City has agreed to a $3 million settlement in an excessive-force suit by a man who was beaten by five police officers and mauled by a police dog in an incident captured on video.

David Castellani filed a lawsuit against the city and the officers in federal court over his 2013 assault outside the Tropicana Casino. The video of his attack was broadcast on CNN. On Aug. 23 the city agreed to the settlement terms, which also require that the police department demonstrate that its K9s meet the training and certification guidelines of the state Attorney General’s Office.

The settlement was reached after U.S. District Judge Jerome Simandle of the District of New Jersey denied summary judgment to the city and the five officer defendants on July 21. The officer defendants decided to exercise their Fifth Amendment rights at trial, said Jennifer Bonjean, the Brooklyn lawyer who represented Castellani.

“The fact that they refused to testify was a major piece of why the city decided it was safer to settle,” Bonjean said.

Castellani, then 20, visited the Tropicana with a group of friends and became heavily intoxicated, Bonjean said. He became separated from the rest of the group and then got involved in a shouting match with several Atlantic City police officers. The officers assaulted and kicked Castellani and beat him with their batons, and a police dog bit him numerous times, the suit claims.

Castellani was arrested and charged with resisting arrest and aggravated assault, and was admitted to a pretrial intervention program. His suit was one of many filed against Atlantic City in recent years over the conduct of its police officers. A 2014 Law Journal analysis found that Atlantic City, the state’s 55th largest municipality by population, was the first in the state in the number of police misconduct suits filed.

Todd Gelfand of Barker, Gelfand & James, who represented the city in the Castellani case, did not return a call about the settlement.

Bonjean, who has brought seven police misconduct suits against Atlantic City, said she sees the sign of modest improvements in the city’s police department, including a system to warn superiors about officers’ misconduct.

“Until they start taking action against misconduct, as far as I’m concerned, the department can only change so much. I’ve not seen the actual following through of holding officers accountable,” Bonjean said.