A police officer in Kansas bought a cup of coffee at McDonald’s. When he picked it up, an employee had written “f**king pig” on it.

That’s what he said, anyway. But it turns out that the officer “fabricated” the story, Herington Police Chief Brian Hornaday said Monday.

And the officer is no longer with the department.

The story exploded on the internet, quickly going viral. On Saturday, the 23-year-old officer — who has not been identified — told the police chief that he received the cup with the vulgar message while he was in uniform. Hornaday took to Facebook and posted a note (since deleted), along with a picture of the cup.

TRENDING: BREAKING: TRAVESTY OF JUSTICE! Durham Investigation Report Before November Election is UNLIKELY! -- DEEP STATE WINS! --Video

Hornaday wrote that the officer was offered a “free lunch” and included a picture of the cup. “This behavior has been, is and always will be wrong,” Hornaday said in the post.

Then Dana Cook, who owns the McDonald’s in Junction City, Kansas, where the incident supposedly took place, said none of his employees had written the message on the cup. He pledged to hand over security footage with Hornaday.

“My McDonald’s have the utmost respect for all members of law enforcement and the military and were troubled by the accusation made,” Cook wrote in the statement. “We thoroughly reviewed our security video from every angle, which clearly shows the words were not written by one of our employees. We look forward to working with Chief Hornaday as he continues his investigation.”

Hornday said he assumed his officer was telling the truth.

“My reaction based on the initial incident was just my reaction based on what I believe, and that’s a police officer who is sworn to protect, their integrity is of the highest order, and it would be foolish of any law enforcement agency or professional to not take the word of their police officer until they can be proven otherwise,” Hornaday said.

The chief said the department’s investigation had cleared employees at the McDonald’s, adding that he viewed security footage, which disproved the officer’s claim.

“We 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,” Hornaday said at a press conference.

The chief also said that the officer said the vulgar message “was meant to be a joke,” but he added that the officer “should have come forward immediately … prior to this becoming a nationwide incident.”

“This is absolutely a black eye on law enforcement,” Hornaday said. “I hope [the former officer] understands the magnitude of the black eye that this gives the law enforcement profession from coast to coast. None of us can be excluded from that.”

After Monday’s revelation, Hornaday said he would be more careful with how he uses social media in the future, CBS News reported.

“I sincerely hope it doesn’t ever happen again, but I assure you that I will often question my decision about posting anything on social media because of the impact that it could have, mostly because everything we do, everything we say in the public eye is always brought into question,” he said.