New York Times journalist Andy Mills announced on Friday that he has resigned following the controversy surrounding the paper's now-discredited podcast series "Caliphate."

"Today I’m resigning from The New York Times. Those are not words I ever wanted to write," Mills began a lengthy resignation letter published on his personal website. "When I was hired as the first full-time audio producer at The Times, the audio department was just an idea, nurtured in an old closet with grey foam panels glued to the walls on the 16th floor. Now it is a pillar of The Times’ journalism and a model for the industry.

"Together with Lisa Tobin, Theo Balcomb, and Michael Barbaro, I helped create The Daily in 2017," Mills continued. "Since then I’ve gone on to help create and develop series like Rabbit Hole with Kevin Roose and The Field with The Times’ politics team. And, of course, in 2018 I helped create and produce the most ambitious project I’ve ever worked on: Caliphate."

NYT STAR UNDER FIRE FOR NOT DISCLOSING TIES TO DISCREDIT 'CALIPHATE' SERIES ON 'THE DAILY' PODCAST

Though Mills stated he remains "proud" of the work that went into "Caliphate," he acknowledged that "getting any aspect of any story wrong, by any degree, is a journalist’s worst nightmare" and that despite the Times' correction, his peers in the industry "began to raise questions about why I had been allowed to remain in my position.

"There are answers to these questions: When it came to fact-checking support for the project, the Times’ leadership told us that they had their own internal system in place for stories of this nature," Mills claimed. "That system broke down. And they did not blame us. In fact, throughout The Times’ reexamination of Caliphate, they told our production team that we’d engaged in rigorous and careful journalism. One masthead editor even made it a point to tell me: 'I won’t let you blame yourself.'

"But in the meantime," he went on, "another story emerged online: that my lack of punishment came down to entitlement and male privilege. That accusation gave some the opportunity to resurface my past personal conduct."

Mills then addressed "mistakes" he made and his past "unprofessional behavior" during his time working as a staffer at public radio station WNYC, which included giving a "back rub" to a colleague, pouring a drink on a co-worker's head at a "drunken bar party," and gaining a reputation as a "flirt."

"I look back at those actions with extraordinary regret and embarrassment," wrote Mills, who added that his actions were addressed by his old employer and claimed he was candid about them when he was hired by the Times in 2016.

NEW YORK TIMES ADMITS MASSIVE FAILURE TO VET FALSE CLAIMS MADE IN 'CALIPHATE' PODCAST

"The allegations on Twitter quickly escalated to the point where my actual shortcomings and past mistakes were replaced with gross exaggerations and baseless claims," Mills said. "Several people have even alleged that I am a predator and a dangerous threat to my colleagues. I have been transformed into a symbol of larger societal evils. As a journalist, it has been especially discouraging and upsetting to see fellow journalists make such claims or retweet them.

"The entire experience has been extraordinarily painful. I know I’m not supposed to say that because people will claim that I’m trying to make myself the victim. I know that I still have a lot of room to grow as a person - I can be overly zealous and talk over people, making them feel unheard. I know that this whole letter opens me up to more public shaming and ridicule. But public shaming is very painful. That is the truth. So is leaving the job you love. And yet, that’s what I feel I need to do."

He continued, "As the pressure of this online campaign has grown to encompass some staffers of The Times, it has led to a climate where, even though I still love the mission of this important institution, I feel it is in the best interest of both myself and my team that I leave the company at this time. I do this with no joy and a heavy heart."

CLICK HERE TO GET THE FOX NEWS APP

The Times did not immediately respond to Fox News' request for comment.  

In December, the paper published an extensive correction after acknowledging "Caliphate" heavily relied on a serial fabulist who claimed to have been a member of the Islamic State (ISIS) terrorist organization. The debacle was so embarrassing for the once-proud newspaper that Times executive editor Dean Baquet called it an "institutional failing" and the Times returned a coveted Peabody Award that the project earned.