Guevara was the Marxist guerrilla who helped Fidel Castro seize power in Cuba. Barbie was the Gestapo chief in Lyon whose crimes included the murder of 44 Jewish children, taken from an orphanage and sent to Auschwitz. Improbably, the men's paths crossed in Bolivia. My Enemy's Enemy, a documentary directed by Macdonald, whose previous films include Touching the Void and The Last King of Scotland, examines how Barbie's record was disregarded when he was recruited by US intelligence after the Second World War as a useful tool against communism. He evaded French justice by fleeing to Bolivia where, living under the alias Klaus Altmann, he was welcomed by fascist sympathisers. Meanwhile, in 1966 a disguised Guevara arrived in Bolivia to organise the overthrow of its military dictatorship.

The Americans had been hunting Guevara and, according to the film, turned to Barbie for his first-hand knowledge of counter-guerrilla warfare: he had attempted to crush the French Resistance and was responsible for the death of its celebrated leader, Jean Moulin. Alvaro de Castro, a longtime confidant of Barbie interviewed for the film, says: 'He met Major Shelton, the commander of the unit from the US. Altmann [Barbie] no doubt gave him advice on how to fight this guerrilla war. He used the expertise gained doing this kind of work in World War Two. They made the most of the fact that he had this experience.'

De Castro adds that Barbie had little respect for Che Guevara. 'Altmann said once, "This poor man wouldn't have survived at all if he fought in the Second World War. He was a pitiful adventurer, nothing like his popular image. The people have turned him into a myth, a great figure. But what has he actually achieved? Absolutely nothing".'

Kai Hermann, a journalist, tells the film-makers: 'He [Barbie] always boasted - though I cannot prove it - that it was he who devised the strategy for murdering Che Guevara.'

The evidence appears inconclusive, but Macdonald, who won an Academy Award for One Day in September, about the killing of Israeli athletes by the Palestinian group Black September at the 1972 Munich Olympics, told The Observer: 'The Che claim came from several sources. I think it makes total sense when you understand what Barbie was doing and who he was working for in the Bolivian military, and how they admired him as a Nazi officer and what he had done in the war. Jean Moulin was an infamous episode, and he would trade on it and use that as part of his calling card.'

Macdonald, whose film will be broadcast on More4 on Thursday at 9pm, added: 'Guevara arrived in Bolivia in disguise - very much like the French Resistance, constantly in disguise, travelling around the country unspotted by the Germans. I suspect Barbie's involvement was more on a theoretical level and, if you think about it, it makes sense from the point of view of the Bolivian government and the Americans. He had hands-on expertise in exactly this type of situation, exactly this field. He was strongly anti-communist. Neither the Americans nor the Bolivians had anything like this kind of experience.'

In October 1967 the Bolivian army, with CIA help, captured the 39-year-old Guevara and killed him.

Barbie was involved in torture again in Bolivia and dreamed of establishing a Fourth Reich in the Andes. But he was tracked down by Nazi hunters and eventually extradited to France, where he was sentenced to life imprisonment and died in jail in Lyon in September 1991.

Macdonald's previous film, The Last King of Scotland, was a fictionalised account of Idi Amin, based on the novel by Giles Foden, with an Oscar-winning performance by Forest Whitaker. The 40-year-old director said that he can see parallels between Amin and Barbie. 'The other side to Barbie is there was a great charm to him, which is one of the things that make him fascinating. He was a bit like Idi Amin: somebody of enormous charm but of enormous evil and utter lack of respect for human life.'