A U.S. federal judge has ruled that a test the Boston Police Department required for sergeants seeking promotion to lieutenant discriminated against minority candidates and urged the city and the 10 plaintiffs to reach a settlement deal.

The 10 black police sergeants filed the lawsuit in 2012, asserting that the multiple-choice tests required for lieutenant candidates in 2005 and 2008 rejected minority candidates at a greater rate than white applicants.

Related: Dorchester man accused of dragging Boston police officers with SUV

U.S. District Judge William Young wrote in an 82-page decision issued late on Monday that the tests appeared to have discriminated, though not deliberately, against minority applicants.

"This is not a case about conscious racial prejudice," Young wrote. "Rather, the plaintiffs' case is rooted in their allegation that the seemingly benign multiple-choice examination promotion process, while facially neutral, was slanted in favor of white candidates."

Minority candidates were promoted as a result of taking the 2008 test less than half as often as white candidates, and those who moved up to lieutenant did so on average two years later than their white counterparts, the judge noted.

Young gave the two sides 30 days to reach an agreement on what damages the city would pay to the plaintiffs and said that if they were unable to agree over that time frame that the plaintiffs could propose damages, with the city then getting 30 days to respond.

A Boston police spokeswoman said the city was reviewing the decision.