Joel Kinnaman was almost written out of ‘The Suicide Squad’.

The 41-year-old actor was due to reprise his role as Rick Flag for the film but his shooting of Apple TV+ series ‘For All Mankind’ was due to take place at the same time as the movie, with director James Gunn working to a tight schedule.

But fortunately, all parties were eventually able to overcome the “really, really tricky scheduling situation” and Joel was able to be involved.

He told The Hollywood Reporter: “My manager, Shelley Browning, and my agents, Boomer Malkin and Andrew Finkelstein, definitely won the agent Oscar for this because it was a really, really tricky scheduling situation.

“And I also have to thank [‘For All Mankind’ creator] Ron Moore so much and everyone at Apple for helping out. Warner Bros. was in first position, but they couldn’t budge because it was such a big cast. So it was a really tricky scheduling thing, and it took them several months to figure it out.

“There were actually people at Warner Bros. that told James, ‘We might have to rewrite this because the scheduling is not going to work out.’

“So I was definitely on edge, but then they figured it out.”

Although Joel played Rick in David Ayer’s ‘Suicide Squad’ five years ago, he opted to play the character as a completely different person this time round.

He said: “When I read ‘The Suicide Squad’ it felt clear. This isn’t really the same guy. It just does not feel like the same guy.

“So pretty early on, I decided I was not going to treat it like a continuation of what I did before. And then I had a chat with James, and he was completely supportive of that idea of just letting this be its own thing.

“The script was so much its own thing, and I just felt like it would be more of a burden to be bound by what I did in the first film. So I just decided to reinvent the character and let him be what he wants to be in this.”