Walt Disney Studios has cut ties with “Guardians of the Galaxy” director James Gunn after a series of his old tweets re-surfaced 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 Friday.

See also: The spectacular rise and fall of MoviePass

Disney DIS, -0.64% owns Marvel, the producers of the “Guardians of the Galaxy” flicks.

In one of his many now-deleted tweets, written between 2008 to 2011, Gunn said: “I’m doing a big Hollywood film adaptation of The Giving Tree with a happy ending – the tree grows back and gives the kid a b—job.”

In another, he wrote, “The Expendables was so manly I f—ked the s—t out of the little p—y boy next to me! The boys ARE back in town!”

Gunn, an outspoken critic of President Trump, came under fire this week from conservative activists who circulated the years-old, off-color tweets.

He issued a mea culpa 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. As I have discussed publicly many times, as I’ve developed as a person, so has my work and my humor,” Gunn tweeted.

“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,” he wrote.

The filmmaker continued: “In the past, I have apologized for humor of mine that hurt people. I truly felt sorry and meant every word of my apologies.”

“For the record, when I made these shocking jokes, I wasn’t living them out. I know this is a weird statement to make, and seems obvious, but, still, here I am, saying it,” he wrote.

“Anyway, that’s the completely honest truth: I used to make a lot of offensive jokes. I don’t anymore. I don’t blame my past self for this, but I like myself more and feel like a more full human being and creator today. Love you to you all,” Gunn tweeted.

Gunn had been working on the script for “Guardians of the Galaxy Vol. 3,” which was expected to be released in 2020.

This report was originally published at NYPost.com.