Then-Pocomoke City police officers Lynell Green, left, and Franklin L. Savage, right, with their former police chief, Kelvin Sewell, in July 2015. (Matt McClain/The Washington Post)

The Justice Department on Wednesday waded into a racially charged legal battle that has torn apart a small town on Maryland’s Eastern Shore, announcing it seeks to join a lawsuit brought by three former Pocomoke City police officials who allege they were the victims of racial bias and retaliation.

Pocomoke’s first black police chief, Kelvin Sewell, former lieutenant Lynell Green and former detective Franklin Savage filed suit in federal court in January alleging an “unchecked pattern and practice of virulent” discrimination by city, county and state officials after each was fired for supporting claims first raised by Savage.

Sewell and Green were indicted in July by a Worcester County grand jury on charges of misconduct by Maryland prosecutors for allegedly interfering with the investigation of a 2014 car accident. The officers denied the charges and contend the indictment was retaliation after their lawsuit.

“Federal law protects against discrimination and retaliation in the workplace,” Vanita Gupta, the head of the Justice Department’s civil rights division, said in a statement Wednesday asking to intervene in the trio’s private lawsuit. “In police departments, that protection is vital not only for individual officials, but also for the communities they serve.”

The federal complaint asks for a court order that would require the defendants — Pocomoke City, a county sheriff and the state of Maryland — to implement policies and procedures to eliminate discrimination and retaliatory conduct. The federal complaint also seeks monetary compensation to the three officers for “damages caused by the alleged discrimination.”

The Justice Department announced its court action late Wednesday after Pocomoke City offices were closed.

The city’s lead defense attorney, Daniel Karp of the Baltimore law firm Karpinski Colaresi and Karp, and Genevieve Goodrow Marshall of Maryland’s attorney general’s office did not immediately respond to requests for comment. City, county and state officials have previously denied the allegations of racial discrimination.

In a statement, Andrew G. McBride of the Washington Lawyers’ Committee for Civil Rights and Urban Affairs and co-lead counsel for the officers, said, “We are gratified that the Justice Department has recognized that this is far more than a run of the mill case, rather it demonstrates a pattern of racial discrimination across law enforcement on the Eastern Shore of Maryland.”

The federal decision to step into the dispute elevates a controversy that has split the town of 4,000, whose racial demographics are evenly divided but whose city council is majority white. It continues a campaign by the Obama administration in which the Justice Department has thrown its weight behind private lawsuits to extend civil rights protections.

Hundreds of demonstrators protested outside Pocomoke City Hall last year demanding Sewell be reinstated after his June 2015 firing. Instead, the city council hired William “Bill” Harden Sr., an African American, to run its 14-officer police department.

But the fired officers said Harden’s hiring did not make up for a history of department discrimination that was joined by law enforcement officials at multiple levels.

In a 26-page filing, the Justice Department charged that the Worcester County sheriff and the state of Maryland subjected Savage to a hostile work environment while he was assigned to a joint task force operated by the sheriff’s office.

The complaint joined the officers’ lawsuit, filed in the U.S. District Court for Maryland, in which McBride said Sewell was fired as chief because he stood up for two black officers who filed a discrimination complaint. The three charged that they “were mocked, threatened, demeaned, demoted, punished, falsely accused of misconduct, ostracized and humiliated because of their race.”

The officers’ suit also alleged that Savage was pushed out after objecting to the repeated use of the “n-word” and references to the Ku Klux Klan.

The three officers’ complaints were investigated by the Equal Employment Opportunity Commission, which made reasonable-cause findings, U.S. officials said.

After unsuccessful talks aimed at conciliation, the EEOC referred the charges to the Justice Department, officials said.