(CNN) Disney has parted ways with director James Gunn after a number of what the studio called "indefensible" tweets he wrote years ago resurfaced.

"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," Alan Horn, chairman of The Walt Disney Studios, said in a statement obtained by CNN.

Gunn had come under fire in recent days after his comments, which made references to pedophilia and molestation, came to light.

On Thursday, Gunn acknowledged the attention his previous social media comments were getting in a series of tweets.

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

Read More