Director James Gunn attends the European launch event of Marvel Studios
PHOTO: Ian Gavan/Getty Images Europe/Getty Images for Disney
Director James Gunn attends the European launch event of Marvel Studios' "Guardians of the Galaxy Vol. 2." at the Eventim Apollo on April 24, 2017 in London, England. (Photo by Ian Gavan/Getty Images for Disney)
Now playing
01:24
Director on making 'Guardians of the Galaxy 2' (2017)
Producer Ellen DeGeneres attends Netflix
PHOTO: VALERIE MACON/AFP/AFP via Getty Images
Producer Ellen DeGeneres attends Netflix's season 1 premiere of "Green Eggs and Ham" at Hollywood Post 43 on November 3, 2019 in Hollywood, California. (Photo by VALERIE MACON / AFP) (Photo by VALERIE MACON/AFP via Getty Images)
Now playing
02:19
The long, and now controversial, career of Ellen DeGeneres
LOS ANGELES, CA - JANUARY 18:  Actor Tom Hanks attends the People
PHOTO: Christopher Polk/Getty Images North America
LOS ANGELES, CA - JANUARY 18: Actor Tom Hanks attends the People's Choice Awards 2017 at Microsoft Theater on January 18, 2017 in Los Angeles, California. (Photo by Christopher Polk/Getty Images for People's Choice Awards)
Now playing
02:07
Tom Hanks' iconic roles throughout the years
sophie turner joe jonas las vegas
PHOTO: instagram/diplo
sophie turner joe jonas las vegas
Now playing
01:23
'GoT' star married by Elvis impersonator in Las Vegas
PHOTO: CBS
Now playing
01:00
Hillary Clinton makes cameo on 'Murphy Brown'
SYDNEY, AUSTRALIA - AUGUST 27:  Jane Fonda wears Chopard at the Sydney Opera House on August 27, 2018 in Sydney, Australia. (Photo by Caroline McCredie/Getty Images for Chopard)
PHOTO: Caroline McCredie/Getty Images AsiaPac/Getty Images for Chopard
SYDNEY, AUSTRALIA - AUGUST 27: Jane Fonda wears Chopard at the Sydney Opera House on August 27, 2018 in Sydney, Australia. (Photo by Caroline McCredie/Getty Images for Chopard)
Now playing
02:09
Jane Fonda opens up in new documentary
Tom Hanks as Mister Rogers
PHOTO: Sony Pictures
Tom Hanks as Mister Rogers
Now playing
00:45
Tom Hanks is your new neighbor Mister Rogers
PHOTO: NBC
Now playing
00:51
Items from 'The Office' up for auction
PHOTO: shutterstock/getty/cnnmoney
Now playing
00:54
Comcast outbids 21st Century Fox for Sky
PHOTO: Instagram/Ryan Reynolds
Now playing
00:58
Ryan Reynolds trolls director as car crashes
PHOTO: FremantleMedia/SYCOtv/NBC
Now playing
01:08
'America's Got Talent' crowns new winner
PHOTO: A&M/Octone Records
Now playing
01:13
Super Bowl performance rumors stir controversy
henry cavill superman mxp vpx_00000114.jpg
PHOTO: Warner Brothers
henry cavill superman mxp vpx_00000114.jpg
Now playing
00:48
Henry Cavill's role as 'Superman' in question (2018)
LAS VEGAS, NV - SEPTEMBER 23:  Recording artist Drake performs onstage at the 2016 iHeartRadio Music Festival at T-Mobile Arena on September 23, 2016 in Las Vegas, Nevada.  (Photo by Kevin Winter/Getty Images)
PHOTO: Kevin Winter/Getty Images North America/Getty Images
LAS VEGAS, NV - SEPTEMBER 23: Recording artist Drake performs onstage at the 2016 iHeartRadio Music Festival at T-Mobile Arena on September 23, 2016 in Las Vegas, Nevada. (Photo by Kevin Winter/Getty Images)
Now playing
00:50
Drake doles out $25K at concert
Vanessa Marquez as Nurse Wendy Goldman on "ER."
PHOTO: Alice S. Hall/NBCU Photo Bank
Vanessa Marquez as Nurse Wendy Goldman on "ER."
Now playing
01:09
'ER' actress shot and killed by police
Pallbearers carry the casket out of Greater Grace Temple at the end of the funeral for Aretha Franklin, Friday, Aug. 31, 2018, in Detroit. Franklin died Aug. 16, 2018 of pancreatic cancer at the age of 76. (AP Photo/Jeff Roberson)
PHOTO: Jeff Roberson/AP
Pallbearers carry the casket out of Greater Grace Temple at the end of the funeral for Aretha Franklin, Friday, Aug. 31, 2018, in Detroit. Franklin died Aug. 16, 2018 of pancreatic cancer at the age of 76. (AP Photo/Jeff Roberson)
Now playing
03:59
Aretha Franklin's funeral fit for a queen
(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.”

He added: “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.”

In a statement through a representative, Gunn said, “I understand and accept the business decisions taken” by Disney.

“Even these many years later, I take full responsibility for the way I conducted myself then,” he said. “All I can do now, beyond offering my sincere and heartfelt regret, is to be the best human being I can be: accepting, understanding, committed to equality, and far more thoughtful about my public statements and my obligations to our public discourse.”

After working in low-budget filmmaking (including a stint at Troma Studios), Gunn made his directing debut in 2006 with “Slither,” followed by the superhero spoof, “Super.”

He was considered a somewhat unorthodox choice when Marvel tapped him to direct “Guardians of the Galaxy,” but the movie garnered critical acclaim and became a major hit. The movie and its sequel – which he also wrote and directed – have grossed more than $1.6 billion worldwide.

In addition to the third “Guardians,” it was announced last year that Gunn was working on a revival of the TV show “Starsky and Hutch” for Amazon.

As recently as last week, Gunn had been teasing other future projects, including an announcement set to be made at the same time as the Sony Pictures panel on Friday evening at San Diego Comic-Con on the convention’s biggest stage – Hall H.

Cryptically, Gunn wrote in a Facebook post that the announcement would be “something dark, sweet, and special.”

Gunn’s appearance was never confirmed by Sony.

A studio insider told CNN that Gunn was not expected to be part of the panel as of Friday afternoon.