Kirsten Dunst has said her new film about a civil war that breaks out in the US is a “warning” not to “take your democracy for granted”.

The Spider-Man star, 41, plays a photojournalist in Civil War, which is set in a dystopian near future where the country has become a dictatorship under a president in his third term.

Written and directed by British author Alex Garland, the film follows a group of military-embedded journalists as they race against time to reach Washington DC before rebel factions descend upon the White House.

Asked if she feared this kind of story could become a reality, Dunst told the PA news agency: “There’s discourse all over the world, so it felt real the way we were making the film.

“This is like ‘don’t take your democracy for granted’ and really about humanity and seeing each other as people rather than taking these extreme positions behind your phone or computers.

“I think that this is a warning, in a way, and an anti-war film, for me.”

Garland said he wanted to put journalists at the centre of the film because he wanted to make them the “heroes”.

He added: “I felt journalists have been under attack in a really complicated way for quite a long time and people, in many ways, don’t trust them anymore.

Civil War special screening – London
Kirsten Dunst and Alex Garland (Aaron Chown/PA)

“But there are journalists out there doing incredibly good work, and the question is not whether they’re doing good work or not, it’s why is their good work not getting traction?

“And why are they being attacked in the way they’re being attacked? So I wanted just to put them at the heart of it.

“I grew up around journalists, my dad worked on a newspaper. So I like journalists, and I think they’re necessary and important.”

Civil War is released in UK cinemas on April 12.