A federal judge this week will consider whether to phase out decades-long hiring rules aimed at diversifying Massachusetts police and fire departments.

The Wednesday afternoon hearing before Judge Patti. B. Saris comes about 50 years after the court cases were filed that led to the rules. Through consent decrees, which have been revised in recent years, the court has directed state human resources officials to follow hiring ratios intended to prioritize Black and Latino candidates.

Only seven communities remain bound by the rules, which previously governed entry-level police and fire department hiring in more than 100 cities and towns. Departments have been released from the decree when their percentages of Black and Latino officers or firefighters reached "rough parity" with the population they serve, WBUR reports.

"It is time for the consent decrees to end, at the proposed termination dates, so that all municipalities in Massachusetts may resume hiring entry-level police officers and firefighters in accordance with state law," according to the state's April filing.

That is because, the attorney general argued, communities bound by the consent decree have either made "substantial progress" toward reaching parity or "have exhausted all reasonable efforts to do so." The filing also said the state wanted to avoid "unintended consequences" of the rules, noting the formula actually suppressed minority hiring in some departments for years before it was amended in 2016.