Hollywood may have abandoned the Western as a movie genre but the spirit of John Ford rides again this week – on an improbable subject in an unlikely place.

One of the most horrific and still unexplained incidents of the brutal Algerian civil war of the late 1990s – the murder of seven French Trappist monks at Tibhirine in 1996 – is the starting point for a French film which aims for the moral and topological sweep of the classic Western.

The film's director, Xavier Beauvois, says that the homage is deliberate. "As far as I am concerned, this is a couscous Western," he says. "There is a Fort Alamo side to the story. Before we made the scene where the soldiers enter the monastery, I played the theme from Once Upon a Time in the West. It worked."

Like most Westerns, the film, Des Hommes et Des Dieux (Of Men and Gods) dwells on the beauty of its mountain and desert landscapes. (This is supposed to be Algeria but is actually Morocco). Like The Magnificent Seven, it tells the story of seven strangers who assist poor villagers and become entangled in a conflict which they do not understand.

In other ways, it is a very French film, relishing the existential dilemma of seven people torn between devotion to their charitable work and the human instinct to flee for their lives. The result, according to French movie critics, is "breathtaking" and "excellent".

The movie, which will come to British cinemas next year, was awarded the Grand Prix at the Cannes film festival in May.

There has been special praise for the performance of the 79-year-old Franco-British actor, Michael Lonsdale, a veteran of 180 mostly secondary roles in films and TV series on both sides of the Channel. He plays Brother Luc, the oldest of the murdered monks. The leading role, as the head of the community, Brother Christian, is taken by Lambert Wilson, best known outside France for his performances in the Matrix movies.

One issue that the film avoids almost completely is the contentious question of who really killed the Tibhirine monks. The seven trappists, aged between 45 and 82, were kidnapped from their monastery 90 kilometres south of Algiers by armed men on the night of 26 March 1996. Their murder was claimed on 21 May by the radical Islamist movement, the Groupe Islamique Armé (GIA), which was fighting a civil war against the secular, military government of Algeria.

The heads of the monks were discovered by a roadside on 30 May 1996. The remains of their bodies have never been found.

The murders, which caused a wave of anger in both France and Algeria at the time, have since become the subject of several conflicting conspiracy theories. A suggestion that the monks were deliberately killed by elements within the Algerian security services is now largely discounted.

A French judicial investigation, launched belatedly in 2004, made little progress until President Nicolas Sarkozy agreed to lift the secrecy of some French government documents on the murders last year. The investigation is now said to be examining seriously allegations by several writers and journalists that the monks were killed accidentally by the Algerian army in a botched rescue attempt.

The suggestion is that Algerian military helicopters machine-gunned a rebel camp soon after the monks were kidnapped. When the helicopters landed they discovered no live rebels but the bodies of the seven dead monks.

Dissident sources within the Algerian army have alleged that there was then a cover-up. The heads of the monks were dumped by the roadside and the rest of their bodies destroyed to disguise the identity of the real killers.

The film's director, Mr Beauvois, says that he largely avoided the question of blame because "I didn't want to put forward a theory which would later prove to be bogus". He preferred to focus instead on the nature of the monks' lives before their disappearance, their relationship with the local people and their dilemma when they knew that their lives were threatened.

One of the last scenes of the movie, however, is a wide angle shot of a helicopter flying over the Atlas mountains. "This implies that I lean towards the cock-up theory," Mr Beauvois said. "It is the most likely explanation. The bodies were never found because they could not be shown publicly. Everyone would have seen that the monks did not have their throats slit by the terrorists. They were killed by heavy calibre army bullets."