Film-makers struggled for 20 years to get investors interested in a film adaptation of Waiting for the Barbarians, JM Coetzee’s novel. His complex tale of immigration and integration was not the easiest sell.

But, in today’s unsettled world, the story feels pertinent as never before. Now the film, starring Mark Rylance, Johnny Depp and Robert Pattinson, is receiving its world premiere at this month’s Venice film festival.

All the actors were motivated by a desire to convey the “message” of the film, as well as explore its “artistic component,” said Andrea Iervolino, one of the producers. “Another production company was trying to do this movie for 20 years. Then they proposed the idea … to me and Monika Bacardi, my business partner. We loved [it] right away because this movie, like the book, speaks about integration and immigration in a world of division,” Iervolino told the Observer.

“Now all governments try to push away immigration, so immigrants are not really welcome. But this movie will show how important and beautiful integration and immigration can be … We believe that the message which this movie gives is very important, more important than 10 or 20 years ago.”

The film is the first English-language movie for the film’s Colombian director, Ciro Guerra and the screenplay is by Coetzee. When his novel was published in 1980, critics described it as a “masterwork”, a parable about the use of mythical enemies for social control. In a story set in an imaginary empire populated by barbarian tribes, Rylance plays The Magistrate, “a responsible official”, who begins to question imperialism. Iervolino described by Variety magazine as one of the industry’s most powerful independent producers, is investing hundreds of millions of dollars in major movies, said the actor deserved an Oscar for his performance.

“He plays someone who realises that the government was trying to scare the population by saying that ‘the barbarians are coming, bad people are coming, the invasion is coming’. Actually, the government was only instilling fear.”

Depp portrays a heartless bureaucrat despatched by the Empire’s secret service amid claims that the barbarians are preparing to mutiny.