Court documents have revealed what ended the 25-year law enforcement career of an assistant police chief in the Louisville suburb of Prospect, Kentucky.

Media outlets report that acting Chief Todd Shaw sent what Jefferson County Attorney Mike O’Connell calls “highly disturbing racist and threatening Facebook messages” to a Louisville police recruit who had sought his advice. Among other things, Shaw advised the recruit to shoot black kids caught smoking marijuana, and then sexually assault their parents.

Shaw’s lawyer, Michael Burns, says he was just “playing” with these and other messages.

“Mr. Shaw held a distinguished career in law enforcement for nearly 30 years,” Burns said. “Throughout his career, he treated all people fairly and respectfully regardless of their race.”

In another message, Shaw, who is white, disparaged the Rev. Martin Luther King Jr., calling him a racist womanizer, and saying “because someone shot him, I get a day off with pay each year.”

Shaw resigned in November after his boss presented him with the messages. O’Connell said Shaw sent the private Facebook messages in September and October 2016.

A judge ordered the evidence released last week. Media outlets had requested the messages under the state Open Records Act. Shaw had sought to keep them secret.

Prospect Mayor John Evans said “the city finds the content of the messages to be abhorrent, disgusting and reprehensible.”

Shaw spent five years with Prospect police and worked for more than 20 years with the Louisville Metro Police Department. The messages were found during a separate investigation into allegations of sex abuse in a Louisville police mentoring program. Two other former Louisville police officers have been charged in that case.

Louisville Police Chief Steve Conrad said he was disgusted by Shaw’s messages and that “any person who holds these thoughts has no business ever donning a uniform and representing those who have sworn to serve every member of every community.

“These actions spit in the face of the determined effort hundreds of thousands of law enforcement officers put forth to build trust and legitimacy in the communities they serve,” the chief said.