A HEARTLESS cop in Texas has lost his job after bragging to colleagues about filling a sandwich with excrement and giving it to a homeless person.

San Antonio officer Matthew Luckhurst was on bike patrol when he put faeces between two slices of bread in a styrofoam container and set it down beside the sleeping man, Fox News reported.

Luckhurst told colleagues what he had done, who were so disgusted that they reported him.

The result: Luckhurst was fired after an internal investigation.

San Antonio Mayor Ivy Taylor issued a statement on the termination.

“Firing this officer was the right thing to do,” Mayor Taylor said. “His actions were a betrayal of every value we have in our community, and he is not representative of our great police force.”

Luckhurst’s lawyer claimed to the San Antonio Express-News that his client joked about giving the excrement sandwich but never actually did so.

“It didn’t happen,” he told the paper.

The paper said investigators tried to track down the homeless man but without success.