Former Breitbart editor Milo Yiannapoulos says the media is out to destroy him. Above, Yiannopoulos at the press conference in New York announcing his resignation, Feb. 21, 2017. Lucas Jackson/Reuters

British journalist Milo Yiannopoulis, a gay man who says he was molested between the ages of 13 and 16, resigned Tuesday as senior editor at Breitbart News, accusing the media of being out to destroy him by misrepresenting comments he made on pedophilia.

Yiannopoulis, 32, whose writings offended women, Muslims, blacks and gays, helped raise Breitbart’s profile since he was hired by former website chief Stephen Bannon, who left the website to join Donald Trump’s presidential campaign and is not chief White House political strategist.

In resigning, Yianopoulis said Breitbart had stood by him even as “others caved.”

Breitbart staff members had mixed reactions to the resignation, with one journalist telling the Washington Post Yiannopoulis had “virtually nothing to do with the news operation.”

“I don’t wish anybody badly, but do I kind of hope Milo goes away?” said Lee Stranahan, a Breitbart reporter who streamed remarks on Periscope shortly before Yiannopoulis’ announcement. “I think I do. I think that would be best for everybody. … Because he’s not adding to the brand.”

The furor started because of a video interview Yiannopoulis did early last year in which he condoned sexual relations with young boys. He joked about a sexual encounter he had with a Catholic priest when he was a teenager.

“You’re misunderstanding what pedophilia means,” Yiannopoulis said in the interview. “Pedophilia is not a sexual attraction to somebody 13 years old who is sexually mature. Pedophilia is attraction to children who have not reached puberty.”

At another point he says: “Some of those relationships between younger boys and older men, the sort of coming of age relationships, the relationships in which those older men help those young boys to discover who they are, and give them security and safety and provide them with love and a reliable and sort of a rock where they can’t speak to their parents.”

Yiannopoulis had been scheduled to speak at the upcoming Conservative Political Action Conference but was disinvited after the videos surfaced. After that, Simon & Schuster canceled plans to publish Yiannapoulis’ memoir, “Dangerous.”

In a lengthy statement at his press conference, Yiannapoulis said he reviewed the video and does “not believe they say what is being reported. Nonetheless I do say some things on the tapes that I do not mean and which do not reflect my views.” He said the tapes released by the conservative Reagan Battalion had been selectively edited, making it appear he condoned child abuse in a “coordinated effort to discredit me.”

Yiannapoulis blamed the media for his downfall and pledged to make a comeback.

Yiannopoulis tried to defuse the situation Sunday, saying on Facebook he does “not support pedophilia. Period. It is a vile and disgusting crime, perhaps the very worst.”

Earlier this year, Yiannopoulos was banned from Twitter for nasty comments about comedian and actor Leslie Jones.

Protesters at the University of California at Berkeley forced the cancellation of a speaking engagement Feb. 1 and caused $100,000 in damage to the campus. University officials said members of an anarchist group known as the Black Bloc were behind the protest.