Disney fired "Guardians of the Galaxy 3" writer-director James Gunn on Friday after a series of his old tweets, in which he joked about topics such as rape and pedophilia, resurfaced online this week.

"The offensive attitudes and statements discovered on James' Twitter feed are indefensible and inconsistent with our studio's values, and we have severed our business relationship with him," Walt Disney Studios chairman Alan Horn said in a statement.

Several of the tweets, which dated back to 2009, include jokes involving children and sexual misconduct.

Gunn was the writer and director of the previous two iterations of "Guardians of the Galaxy," which were huge box office hits for Disney and Marvel; the first movie, released in 2014, grossed $773 million worldwide. The follow-up in 2017 brought in $864 million at the global box office. The third version was reportedly on track for a 2020 release. Gunn was scheduled to appear at San Diego Comic-Con on Friday evening, before news of the firing broke.

Gunn has a history of making online comments that have stirred controversy. Several years before his first "Guardians of the Galaxy" film was released, he apologized for remarks in his blog that were called homophobic and sexist.

He addressed the new controversy Thursday night.

"Many people who have followed my career know when I started, I viewed myself as a provocateur, making movies and telling jokes that were outrageous and taboo," he tweeted. "As I have discussed publicly many times, as I've developed as a person, so has my work and my humor."

He continued: "It's not to say I'm better, but I am very, very different than I was a few years ago; today I try to root my work in love and connection and less in anger. My days saying something just because it's shocking and trying to get a reaction are over." And, in another tweet, he added: "In the past, I have apologized for humor of mine that hurt people. I truly felt sorry and meant every word of my apologies."

Gunn is a vocal President Donald Trump critic and active social media user who often directs his ire at conservatives, and his tweets were resurfaced by Trump supporters.

This tactic has become a mainstay of the pro-Trump internet: finding and amplifying potentially offensive old social media posts of perceived critics. In December, progressive talk radio host and comedian Sam Seder was fired, and then re-hired, as an MSNBC contributor after right-wing Twitter personalities recirculated a past offensive joke.

In Gunn's case, the story was fueled by the volume of the writer-director's offensive tweets, along with a conspiracy theory that is popular on the pro-Trump internet that claims that Hollywood is part of a secret pedophile ring, along with Democrats.

This article was written by Elahe Izadi and Abby Ohlheiser, reporters for The Washington Post.