Joss Whedon has revealed Agent Phil Coulson was always going to die in 'The Avengers'.

The film's director said Marvel Studios, which produced the movie, always intended to kill off the fan favourite S.H.I.E.L.D. agent - played by Clark Gregg - in the epic superhero blockbuster, although his character will return in a spin-off TV show.

Speaking at a screening of the film at the Directors Guild in Hollywood, he said: ''Coulson's death was mandated in the first meeting by Kevin Feige (producer).

''I can't say that enough times. Apparently I have some kind of reputation that we won't discuss right now, but I do love to kill people. Clark himself said when we were shooting that it was obvious that it had to happen, otherwise all of this becomes irresponsible. There's no toll or actual downside to this very bad idea of bringing all of these people together. As a film it's just irresponsible. That's why we're bringing him back for a 'S.H.I.E.L.D.' series.''

Clark Gregg - who also appeared as Coulson in 'Iron Man', 'Iron Man 2' and 'Thor' - will reprise his role in the spin-off TV show, 'S.H.I.E.L.D.' which is set to begin shooting next year.

'The Avengers' - which saw heroes Iron Man, Thor, The Hulk and Captain America unite for the first time on the big screen - has grossed more than $1.5 billion worldwide.

Whedon is returning to write and direct a sequel which has a tentative release date of May 2015.