Kirsten Dunst had sleepovers with her 'The Beguiled' co-star Elle Fanning.

Kirsten Dunst

Kirsten Dunst

The 35-year-old actress stars alongside Nicole Kidman, Fanning and Colin Farrell in the Sofia Coppola remake of the 1971 Clint Eastwood movie and the whole cast had "a lot of fun" on set.

Speaking to Collider, Dunst said: "It's funny because I have a lot of fun memories. I became close friends with Elle Fanning. We had sleepovers together and a lot of funny nights together.

"And being in New Orleans we just had the best time. The whole vibe was the best."

The film follows an injured Union solider (Farrell) who finds himself on the run as a deserter during the Civil War. He seeks refuge at an all-female Southern boarding school where the teachers and students seem more than willing to help.

Soon, sexual tensions lead to dangerous rivalries as the women tend to his wounded leg while offering him comfort and companionship.

Dunst has worked on a number of Coppola movies in the past and Dunst was asked to the play the role of the teacher before the script was even written.

The actress said: "Three years ago she told me about the project and told me about the Clint Eastwood movie and said she is going to remake it.

"Sofia said I am going to be the teacher and that was before the script was written. I always know what a Sofia Coppola movie is. It has its own aesthetic and vibe in terms of cinema and you know it's going to be something special."