A Kansas police officer who initially claimed McDonald's employees wrote "F*****g pig" on his cup has resigned, the city's police chief said.

"In (our) investigation we have found that McDonald's and its employees did not have anything whatsoever to do with this incident, this was completely and solely fabricated by a Herington police officer who is no longer employed with our agency," Herington Police Department Chief Brian Hornaday said in a news conference Monday.

The incident, the chief said, has been an "obvious violation of ... public trust."

"Our job is solely to do this job with the utmost integrity because if you can't trust the cops, who can you trust," he said.

After McDonald's conducted its own investigation, the owner and operator of the Junction City franchise said in a statement the fast food chain was "glad that the evidence confirmed our evaluation that McDonald's and our crew members were absolutely not involved."

"We took seriously our role to be transparent and fully cooperative with Chief Hornaday throughout his investigation, and we look forward to continuing a strong relationship with the department," Dana Cook said.

The police chief said the department's investigation concluded that the incident was "meant to be a joke."

He did not release the officer's name, saying the matter was now "a personnel issue." He said the officer was a resident of Junction City and had been with the department for about two months. He is not facing any criminal charges at this time, Hornaday said.

A 'black eye' on law enforcement, chief says

Hornaday told CNN the officer involved in the incident sent him a picture of the marked cup on Saturday through a text message. The chief then uploaded it to Facebook from his personal account.

Before learning that the officer's story was made up, Hornaday called the incident a "black eye for Junction City."

On Monday, he said, "now, this is absolutely a black eye on law enforcement."

"I truly hope that the former officer ... that did this, I hope he understands the magnitude of the black eye that this gives the law enforcement profession from coast to coast," he said. "None of us can be excluded from that."

The chief added he will now "often question my decision about posting anything on social media because of the impact that it could have."

"Moving forward the Herington Police Department will work tirelessly to regain the loss of trust with both McDonald's and with the citizens that we serve and any other person that this may have affected."