OAKLAND, Calif. (AP) — A Northern California judge ruled that five Oakland police officers who fatally shot a homeless man in 2018 were unjustly fired and should have kept their jobs.

Alameda County Superior Court Judge Frank Roesch said in his ruling issued Tuesday that Oakland city employees “improperly manipulated” an outside investigator’s report that initially concluded the officers were unjustly fired and should have kept their jobs, the East Bay Times reported Thursday.

The officers fatally shot Joshua Pawlik, 31, in North Oakland on March 11, 2018. Pawlik was armed and asleep in a small space between two homes. Officers rustled him from his sleep and said they fired at him because he would not put down the gun.

Four of the officers — William Berger, Brandon Hraiz, Craig Tanaka and Sgt. Francisco Negrete — fired guns and Officer Josef Philips shot a bean bag.

Karen Boyd, Oakland’s communications director, said in a statement that city officials “adhered to the letter and spirit of the labor agreement, and believe the Court erred in finding otherwise.”

“We remain committed to ensuring our employees are afforded due process in all disciplinary processes,” she added. She did not say whether the city would appeal the decision.

Michael Rains, an attorney who represented the officers, said the judge’s decision clears the path to allow them to either return to work for the Oakland Police Department or get retroactive pay. It’s not clear what the officers will do, Rains said, adding that most of them are now working for other law enforcement agencies.

In 2020, the Oakland City Council agreed to pay $1.4 million to Pawlik’s mother to settle a wrongful death lawsuit.