The mayor of a small Alabama city said the city couldn’t legally fire police officers after the city’s three-member police department was engulfed in a scandal over racist texts. So the city is instead disbanding the department and laying off its officers.

The city council for the city of Vincent unanimously voted to disband its three-member police department during a public meeting Thursday after authorities say one of the members of the department sent a text with a racist joke about slavery. The texts, which Mayor James Latimore said were sent in June, sparked outrage after being posted online in July.

Earlier in August, the city council voted to suspend the police chief and assistant police chief. The police department’s third member resigned just hours before the city council vote.

That meeting set in motion the process of disbanding the department, but the details of how to terminate remaining officers remained unresolved.

The plan to fire them hit a legal snag, even as some officers announced their plans to retire.

PREVIOUS REPORTING:Alabama town disbands police department after officer’s slavery text surfaces

The problem with firing the officers was uncovered by the city’s attorney, Latimore said at Thursday’s meeting. The city’s personnel policy requires two written complaints and a verbal warning to be filed before an employee can be terminated.

Latimore said there have been no official complaints against any police department employee during the time he has been mayor.

Voting to eliminate the department solved the issue, the city’s mayor said: “It’s not firing them,” Latimore said. “It’s laying them off.”

Disbanding the department also allows the city to craft a better policy to deal with future disciplinary issues, should the department come back one day.