EXCLUSIVE: One day last summer, James Gunn was busy writing to direct the third installment of Marvel’s blockbuster Guardians of the Galaxy franchise until, suddenly, he wasn’t. Disney abruptly fired him and his entire career was upended.

Though he would finish that script, the corporation pulled the plug after being presented with a volley of joke tweets Gunn wrote that made light of pedophilia and rape. The tweets were vile, and the optics terrible. It didn’t matter that they were tweeted a decade ago. That he’d previously apologized. Or, that he was the target of a takedown campaign by alt-right journalists after his anti-Trump missives. Disney was prompted to act — it had just banished Roseanne Barr from the hottest show on TV that bore her name because of offensive tweets — and Gunn’s career was endangered.

In a move last March that seemed just as shocking, the studio changed course and reinstated him. Having previously written and directed two hit Marvel films that globally grossed over $1.6 billion, he will now helm Guardians 3 after he finishes The Suicide Squad.

The formerly outspoken filmmaker helped his cause somewhat by not blaming anyone but himself. Now, for the first time, Gunn breaks his silence on the lessons he learned.

How did you feel when Disney’s Alan Horn invited you back for Guardians of the Galaxy 3?

I was about to sit down and talk about The Suicide Squad with DC and I was excited about that. Alan asked me to come talk to him. I really believe he is a good man and I think he hired me back because he thought that was the right thing to do. I’ve known him a little, going back to the Scooby-Doo movies. I’ve always liked and admired him. I was touched by his compassion.

You hear in Hollywood that everybody’s cutthroat. That’s true of a section of this industry, but there’s also a lot of really good people. I’m always attracted to finding that goodness in places we don’t expect, often in the characters in my movies. I got a little bit teary-eyed in his office. And then I had to go tell Kevin Feige I had just decided to do The Suicide Squad, so that made me very nervous.

Neither Horn nor Feige ever met with another director, but your exit was so emphatic. Had you come to grips with losing the franchise you’d brought to the screen?

Yes. I was writing Suicide Squad and thought of Guardians 3 as being long gone. I guess it was a possibility for a while, but the initial conversations with Alan weren’t, “Let’s figure out if I should come back.” It was, “Let’s talk about this.” It was like the break-up of my marriage. I got divorced, and then had those conversations with my ex-wife: “Let’s get along as well as we possibly can and be kind to each other because we’re both a large part of each other’s lives.”

But I would hate to look back on the six years that my wife and I were together and think, Oh, what a waste of time. Instead, I think it was a time when I really grew a lot and we were really good to each other. There were some problems, and we just weren’t supposed to be married, but it was well worth living that six years with my ex.

I wanted to feel that way about Disney. I didn’t want to look back and feel bitter, upset or angry. Of course all sorts of emotions are attached to it. But I just wanted to be comfortable saying goodbye and splitting up, and that’s where my head was at, even in the very early meeting we had, a week or two weeks after it all happened.

For a filmmaker with a reputation for being outspoken on social media, your public response to the firing was muted. You didn’t blame anyone but yourself, which clearly factored into Horn’s decision to reinstate you. What was going through your head at that time?

I don’t blame anyone. I feel and have felt bad for a while about some of the ways I spoke publicly; some of the jokes I made, some of the targets of my humor, just the unintentional consequences of not being more compassionate in what I’m putting out there. I know that people have been hurt by things that I’ve said, and that’s still my responsibility, that I wasn’t as compassionate as I should be in what I say. I feel bad for that and take full responsibility. Disney totally had the right to fire me. This wasn’t a free speech issue. I said something they didn’t like and they completely had the right to fire me. There was never any argument of that.

That first day… I’m going to say it was the most intense of my entire life. There have been other difficult days in my life, from the time I got sober when I was younger, to the death of friends who committed suicide. But this was incredibly intense. It happened, and suddenly it seemed like everything was gone. I just knew, in a moment that happened incredibly quickly, I had been fired. It felt as if my career was over.

I think the one thing that is the most important for me from that day is this: I’m like a lot of people who come out here and want to be rich and famous, to have people love them. I am an artist first and foremost; I love telling stories, I love interacting with my characters, I love designing sets. But I’m also a guy who found what I thought was love, through people loving me, and through my work.

My apparatus for being loved was my work, and being famous. I had never really experienced before that feeling of being loved so deeply. It has been a problem for me in relationships, in friendships; I can experience loving another person but I have a very difficult time experiencing being loved. In that moment, the apparatus which was my only hope for feeling love was torn away from me and I had absolutely nothing. I didn’t know what I was supposed to do. Should I be locked away?

And then came this outpouring of real love. From my girlfriend Jen; my producer and my agents; Chris Pratt calling me and freaking out; Zoe Saldana and Karen Gillan, all calling and crying. Sylvester Stallone FaceTime-ing me. And, of course, Dave Bautista, who came out so strong. That amount of love that I felt from my friends, my family, and the people in the community was absolutely overwhelming. In order for me to have fully felt that love for the first time, the thing that needed to happen was the apparatus by which I was feeling falsely loved had to be completely taken away.

So a part of that day was the worst of my life, and a part of it was the greatest day of my life. I certainly haven’t been perfect in my spiritual journeys since that time, but I have been better.

That first couple weeks, I completely stayed off social media. I just completely disconnected from all of that. It was hard as hell and I was really living minute-to-minute, but it was also rewarding, in being able to see life from a different perspective.

What about the part of you that realizes: I did this to myself; this injury is self-inflicted?

The truth is I had a lot of anger at myself and I really had to try to put that aside. Because in the same way where I know what I’ve done wrong, I know that I’ve done a lot of wrong things in my life, things that led to this moment. I had to realize what I needed to do differently in my life. That was a part of all of this.

But in the same way I needed to not be lashing out at whoever fired me, or whoever spread links online, or cut up pictures to look like this or that, I also had to let go of some of that rage towards myself as well. Otherwise I just wasn’t going to be able to make it through.

You landed Suicide Squad 2 right after settling out with Disney. How did the reaction of rival studios allay fears you were now too ‘hot button’ to get another job?

Technically my fears were allayed immediately; Jason Blum was doing a [San Diego Comic-Con] panel when the announcement happened and he said, “I’d hire James Gunn right now.”

At the same time, I didn’t know what I believed. The news that I was hired back, it was a big story for a day and then it’s done. When all this happened, it went for days and days and days. As much as I wasn’t reading the news, I was feeling the shrapnel constantly through all of the texts and calls from my friends and family who were so upset at this or that. I finally had to be like, “Guys, I can’t focus on all the negative stuff right now, it just hurts me.”

The studios, for the most part, said, “We’d love to have you.” They called within the first two days. But I didn’t believe it. That’s the thing that I have to be honest about. On some theoretical level, I was like, “Well, maybe I do have a future.” I’m a fairly logic-oriented person and that helped, but emotionally, there was not a whole lot there to hold onto. That was good for me, too, because what I needed to do was stop making my career be what makes me worthwhile and start making me just be OK as myself. That is what I concentrated on. I concentrated on the fun.

The Suicide Squad, it just instantly started flowing. I don’t think I’ve had as much fun writing a script since maybe Dawn of the Dead. That’s what this whole movie has been like.

Given another lease on life with Guardians, what characters or themes are you most excited to see through in the third film?

When you asked me what was saddest for me when I thought it was gone—and anybody at Marvel can tell you—it’s this very strange and attached relationship to Rocket. Rocket is me, he really is, even if that sounds narcissistic. Groot is like my dog. I love Groot in a completely different way. I relate to Rocket and I feel compassion for Rocket, but I also feel like his story has not been completed. He has an arc that started in the first movie, continued into the second and goes through Infinity War and Endgame, and then I was set to really finish that arc in Guardians 3. That was a big loss to me—not being able to finish that story—though I was comforted by the fact that they were still planning to use my script.

How devastated were you that Rocket didn’t sweep the Oscars with his directorial debut A Star is Born?

I loved that movie. I saw Bradley Cooper recently. I said, “I remember when you were showing me videos of Lady Gaga singing,” when he was first prepping the movie. You go, OK, here’s this actor who’s going to go direct this movie with Lady Gaga… I was excited for Bradley, but nervous. I’ve had a lot of friends who’ve directed movies and nine times out of 10 it does not go that well. What an incredible accomplishment that was for a first-time director.

From one who has come out the other side, what do you make of the current industry climate, in which behaviors are being exposed and people often banished?

There’s a lot of really positive stuff that’s coming out of all of this, and one of those positives is I was able to learn. People have to be able to learn from mistakes. If we take away the possibility for someone to learn and become a better person, I’m not sure what we are left with. I’ve learned all kinds of things about myself through this process.