Follow KDKA-TV: Facebook | Twitter

LOS ANGELES (AP) – James Gunn has been fired as director of “Guardians of the Galaxy Vol. 3” because of old tweets that recently emerged where he joked about subjects like pedophilia and rape.

READ MORE: Major Outage Hits Amazon Web Services, Affecting Many Sites

Walt Disney Studios Chairman Alan Horn said in a statement Friday that the tweets are indefensible, and the studio has severed ties with Gunn.

ANAHEIM, CA – MAY 25, 2017: In this handout photo provided by Disney Resorts, director James Gunn attends the grand opening of Guardians of The Galaxy – Mission: BREAKOUT! attraction on May 25, 2017 at Disneys California Adventure in Disneyland in Anaheim, California. (Photo by Richard Harbaugh/Disneyland Resort via Getty Images)

READ MORE: Port Authority Holds Public Meetings On Mon Valley Transit Upgrades

Gunn has been writer and director of the “Guardians of the Galaxy” franchise from the start, taking an obscure Marvel Comics title about a group of misfits and turning it into two huge hits that together totaled more than $1.5 billion in global box office.

Gunn on Thursday sent several tweets saying he was sorry for trying in the past to get laughs through shock value.

His publicists did not immediately respond to an email seeking comment.

MORE NEWS: COVID-19 In Pittsburgh: Allegheny County Reports 849 New Cases

(Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)