An NYPD detective was indicted Thursday for allegedly fabricating an anonymous tip on an illegal gun that had already been recovered to claim the reward money, according to the Manhattan district attorney's office.

John Malloy, an officer since 2006 who was assigned to the department's Operation Gun Stop, allegedly forged his supervisor's signature in November 2012 to claim a $1,000 reward for a gun that had been previously recovered in Brooklyn, according to the Manhattan DA's office. There was no actual tip for that particular gun, the DA's office said.

Malloy, 46, was charged in a 13-count indictment, including second-degree forgery. He pleaded not guilty Thursday in Manhattan Supreme Court and was released without bail, said a spokeswoman from the DA's office.

The Gun Stop program is designed for people to collect a reward for anonymous information leading to the arrest of anyone who possesses an illegal gun.

Malloy allegedly used another detective's name and forged his signature, according to the Manhattan DA's office. That detective was then investigated for the crime and eventually the case was reported to Internal Affairs.

When questioned about the incident, Malloy allegedly told investigators that he forged the signature because he couldn't read his supervisor's handwriting.

"I know I shouldn't have," he allegedly said, according to court documents. "I was having health problems and under a lot of stress."

His attorney did not return a request for comment.