The dismissal of a reverse-discrimination lawsuit brought by a Buffalo police captain against the City of Buffalo, the Buffalo Police Department and former Police Commissioner H. McCarthy Gipson was affirmed this week by the U.S. Court of Appeals for the Second Circuit.

The ruling confirms that the city “was only trying to get the best test that was fair to everyone,” said Adam W. Perry, who represented the city in the lawsuit.

The decision will have broad implications for cities, towns and villages grappling with compliance with anti-discrimination laws while fearing the possibility of reverse-discrimination lawsuits, according to Perry.

“It makes clear that municipalities have broad discretion in personnel practices in efforts to comply with federal anti-discrimination law and to avoid potentially discriminatory practices,” said Perry, who handled the case with Joshua I. Feinstein.

Buffalo Police Capt. Mark R. Maraschiello, who is white, said in the federal lawsuit that he took a civil service test in 2006 to be promoted to inspector. He was put on a list of potential candidates, he said, but there was no opening.

Then a new test was designed, he said, at least in part to better comply with federal anti-discrimination laws. That test was offered in 2008, Maraschiello said, but he did not take it. In the meantime, the results of the 2006 test were allowed to expire.

Another white man placed first on the new test and was promoted to inspector.

The court found in its 28-page ruling that “Maraschiello cannot demonstrate that the generalized overhaul of departmental promotional requirements amounted to the sort of race-based adverse action discussed” in Ricci v. DeStefano, a 2009 case in which white firefighters from New Haven, Conn., successfully argued that their test scores were thrown out because whites outperformed minority candidates.

Maraschiello’s attorneys, Lindy S. Korn and Richard J. Perry, said that they disagreed with the appeals court’s decision and that they are reviewing the judges’ findings.

“I think the city missed the boat in not promoting [Maraschiello] to inspector,” Richard Perry said.

He pointed out that Maraschiello graduated from Princeton University and that in addition to being a captain, he is commander of the Buffalo Police SWAT Team.