Two Philadelphia police officers, one of them a homicide detective, were fired and criminally charged Thursday in separate cases of alleged misconduct, authorities said.

Nathaniel Williams, who was assigned to the Homicide Unit, was charged with tampering with public records, unsworn falsification to authorities, tampering with or fabricating physical evidence, and obstructing the administration of law.

The District Attorney’s Office said an investigation was started when a woman alleged she was being stalked and harassed by Edward Williams, a SEPTA employee and relative of the detective. Edward Williams was charged with unsworn falsification to authorities and obstructing the administration of law. No further details were provided.

Nathaniel Williams, 48, a 26-year veteran of the force, was suspended with intent to dismiss by acting Police Commissioner Christine M. Coulter.

A spokesperson for SEPTA could not be reached for comment about Edward Williams.

In the other case, Charles Myers, who was assigned to the Narcotics Field Unit, allegedly lied under oath in court about a March 24, 2017, incident in which two people were searched and arrested at a gas station in the 7000 block of Castor Avenue. Prosecutors said Myers’ testimony about the arrests and narcotics and firearms charges were disproven by video evidence.

Myers, 47, a 20-year veteran of the department, was charged with perjury, tampering with public records, and unsworn falsification to authorities. He also was suspended with intent to dismiss by Coulter.

“It is never a good day when public employees are charged with breaking the law. And when public officials are alleged to have abused their power for personal advantage or gratification, it is insulting to the overwhelming majority of public employees who do their jobs with integrity and decency, and who in some cases put themselves in harm’s way to protect the rest of us,” District Attorney Larry Krasner said in a statement.

A spokesperson for the police officers’ union said the fired officers were being represented by the union, but had no further comment.