A COP who fed a homeless man a sandwich filled with dog poo has been allowed to keep his job.

Matthew Luckhurst, a police officer in San Antonio, Texas, won an appeal against his indefinite suspension on a technicality.

He was accused of picking up dog poo, placing it on a slice of discarded bread and putting it in the container of a “half-eaten meal” provided by a local homeless advocacy group.

The police officer then placed it next to a sleeping homeless man.

After being accused of carrying out the sick prank in May 2016, Luckhurst was investigated by the SAPD's Internal Affairs department and fired in November that year.

The San Antonio Police Officers Association later argued that the incident didn't happen in May, but more likely in March or April.

This meant that a punishment in November would have fallen outside of the 180-day limit for disciplinary action.

“The indefinite suspension is overturned due to the violation of the 180-days prohibition,” the arbitrator wrote in his decision.

It was noted that while the suspension was overturned, that punishment was deemed reasonable based on the fact that Luckhurst's actions were “grossly inappropriate”.

San Antonio Police Chief of Police William McManus disputes the timeline that led to the decision.

“Unfortunately the arbitrator’s decision was based on Luckhurst’s version of the incident even though testimony from officers who were present at the scene established a clear timeline of events.

“He is still facing a separate indefinite suspension and we will vigorously defend the decision to terminate him.”