D.C. police and the union for the rank-and-file officers have ended one of their most divisive disputes with a $9 million agreement to pay overtime for working All Hands on Deck, the former chief’s signature crime-fighting program.

The settlement worked out over the weekend comes after a federal arbitrator ruled in 2009 that the extra assignments were illegal and violated parts of the contract over pay and work schedules. The District appealed the decision to a labor relations board, but lost in 2011.

Under AHOD, then-D.C. Police Chief Cathy L. Lanier periodically canceled leave and ordered every officer to street patrol for a two- or three-day weekend, an initiative she said was aimed at curbing crime during peak periods and making a show of strength to criminals and to D.C. residents.

Representatives of the police union have long complained that the orders violated labor agreements because officers were not properly paid for what the union dubbed a public relations tool.

Neither top police nor the head of the union would say Monday how much each officer might receive.

The settlement was reached two weeks after Lanier retired from the force and as newly elected union leaders were taking office.

“We have been working on resolving a lot of the disputes we have had with the labor union,” interim police chief Peter Newsham said Monday. “I think this settlement gives us all a new beginning and new way to step forward and work toward policing this city in a positive way.”

Newsham wouldn’t comment on whether he intended to use the All Hands on Deck strategy, but said he would consult with the police union before making significant changes or dictates in the crime-fighting plan.

“If we have any crime operations we are going to run, we are going to discuss it with the Fraternal Order of Police to make sure we’re both in agreement on the best way to fight crime in the city,” Newsham said.

His statement on consulting the union before making dramatic changes in tactics marks a stark departure from the sharply contentious relationship between Lanier and then-union head Kristopher Baumann, who headed the FOP during most of Lanier’s tenure.

Some union officials continue to object to the settlement, Newsham said.

Sgt. Matthew Mahl, chairman of the D.C. police union, said, “This settlement isn’t going to make everyone happy.” He noted what he called “unrealistic expectations” by some officers who thought they would receive “10, 20 or 30 thousand dollars. People were given false expectations.” And Mahl acknowledged that some union officials who also were part of past leadership have voiced displeasure with the settlement, arguing it should have resulted in a higher payout.

Some members of the 3,700-member police force had expected that tens of thousands of dollars in overtime would eventually appear in their accounts.

A single weekend of deployment under AHOD was estimated by the union to carry a cost of between $1.5 million and $4.3 million. At least 20 deployments from 2009 through 2015 were in dispute in the legal challenges, and based on that tally, a total payout could have reached the tens of millions of dollars.

Before individual officers can collect, authorities will have to review pay ledgers and work schedules dating to 2009 to determine who is eligible for payments and how much that overtime will be. Some officers could receive checks in the thousands of dollars; Mahl said the District hopes to pay the money before Christmas but said a more realistic expectation is for money to be paid four months from now.

The agreement covers AHODs between 2007 and 2013. Grievances filed in connection with AHODs in 2014 and 2015 were dropped as part of the settlement talks. Officers can appeal rulings made in their individual cases.

The legal history was mixed in the case.

Police did win some appeals with arbitrators — and Lanier refused to stop the program. Even in one of the victories, the Public Employee Relations Board set limits on how much officers could be compensated and said that officers could not be compensated for having leave taken away.

Mahl said in a statement that attorneys concluded that going forward with the case “would have most likely resulted in less of a payout than what this settlement agreement would have provided to members effected.”

Clarence Williams contributed to this report.