A biopic by Abel Ferrara at the Venice biennale will reconstruct the last hours of the Italian film director, who was murdered in 1975

"Want to go for a spin?" the poet and maestro of Italian cinema asked the rent boy, according to the latter's confession to the police. "Come ride with me, and I'll give you a present."

So began the events leading to the murder of Pier Paolo Pasolini, brilliant intellectual, director and homosexual whose political vision – based on a singular entwinement of Eros, Catholicism and Marxism – foresaw Italian history after his death, and the burgeoning of global consumerism. It was a murder that, four decades later, remains shrouded in the kind of mystery and opacity Italy specialises in – un giallo, a black thriller.

The encounter occurred in the miasma of hustling around Roma Termini railway station at 10.30pm on 1 November 1975. And it marks the point of departure for a film tipped to win the Golden Lion at the Venice biennale festival this week – Pasolini, starring Willem Dafoe and directed by Abel Ferrara, Bronx-born of Italian descent. The film deals with the last day of an extraordinary life. Ferrara says: "I know who killed Pasolini," but will not give a name. But in an interview with Il Fatto Quotidiano, he adds: "Pasolini is my font of inspiration."

At 1.30am, three hours after the station rendezvous, a Carabinieri squad car stopped a speeding Alfa Romeo near the scrappy coastal promenade of Idroscalo at Ostia, near Rome. The driver, Giuseppe (Pino) Pelosi, 17, sought to run, and was arrested for theft of the car, identified as belonging to Pasolini. Two hours later, the director's body was discovered – beaten, bloodied and run over by the car, beside a football pitch. Splinters of bloodied wood lay around.

Pelosi confessed: he and Pasolini had set off, and he had eaten a meal at a restaurant the director knew, the Biondo Tevere near St Paul's basilica, where he was known. Pino ate spaghetti with oil and garlic, Pasolini drank a beer. At 11.30pm they drove towards Ostia, where Pasolini "asked something I did not want" – to sodomise the boy with a wooden stick. Pelosi refused, Pasolini struck; Pelosi ran, picked up two pieces of a table, seized the stick and battered Pasolini to death. As he escaped in the car, he ran over what he thought was a bump in the road. "I killed Pasolini," he told his cellmate, and the police.

Pelosi was convicted in 1976, with "unknown others". Forensic examination by Dr Faustino Durante concluded that "Pasolini was the victim of an attack carried out by more than one person".

On appeal, however, the "others" were written out of the verdict. Pelosi had acted alone and the master was dead in a squalid tryst gone wrong and best forgotten, perhaps even deserved. But fascination with Pasolini and his films (in Italy, his writing too) increased – as did that with mysteries that still hang over his last hours.

The renown of his work is manifestly on merit: New York's Moma mounted a retrospective in 2012, the BFI in 2013. In April this year the Vatican, which had once pursued Pasolini and helped secure a criminal conviction for blasphemy, declared his masterpiece, The Gospel According to St Matthew, "the best film ever made about Jesus Christ". This expression of Pasolini's radical faith portrays Jesus as a revolutionary "red Messiah", according to the Franciscan doctrine of holy poverty, which in part influences the current pontiff, Francis.

But the compulsion of his death is less explicable: in 2010 the former mayor of Rome and leader of the centre-left Democratic party, Walter Veltroni, demanded that the case be reopened on the basis of a convergence of strange, and politically charged, circumstances.

Pasolini was killed the day after his return from Stockholm, where he had met Ingmar Bergman and others in the Swedish cinematic avant-garde, and given an explosive interview to L'Espresso magazine. In it, he addressed his favourite theme: "I consider consumerism to be a worse form of fascism than the classic variety."

Pasolini's view of a new totalitarianism whereby hyper-materialism was destroying the culture of Italy can be seen now as brilliant foresight into what has happened to the world generally in an internet age. But his critique had been, for months before the murder, more specific. He had singled out television as an especially pernicious influence, predicting the rise and power of a type such as media-mogul-turned-prime minister Silvio Berlusconi long before time. More specific still, he had written a series of columns for Corriere della Sera denouncing the leadership of the ruling Christian Democratic party as riddled with Mafia influence, predicting the so-called Tangentopoli – "kickback city" – scandals 15 years later, whereby an entire political class was put under arrest during the early 1990s. In his columns, Pasolini declared that the Christian Democratic leadership should stand trial, not only for corruption but association with neo-fascist terrorism, such as the bombing of trains and a demonstration in Milan.

Again, a spine-chilling vindication: these were the so-called "years of lead" in Italy, culminating in the bombing of Bologna station five years after Pasolini's death by neo-fascists working with the secret services, killing 82 people.

I was a student in turbulent Florence in 1973, returning every year thereafter and affiliated to a radical organisation called Lotta Continua (Struggle Continues); and I well remember Lotta Continua's newspaper taking contributions from Pasolini, though his relationship to the radical movements spawned by 1968 was ambiguous. He had identified with police officers against student rioters because, he said, they were "sons of the poor" attacked by bourgeois "daddy's boys".

So it was that, in the wake of the murder in 1975, those close to Pasolini saw the hand of power behind his killing. It would not have been a first: prominent leftists were often attacked or killed; feminist Franca Rame, who would marry the anarchist playwright Dario Fo, was gang-raped by neo-fascists, urged by the Carabinieri.

Members of Pasolini's family and circle of friends, and the writers Oriana Fallaci and Enzo Siciliano raised possible political motives for the killing and produced evidence that contradicted Pelosi's confession, such as a green sweater found in the car that belonged neither to Pasolini nor Pelosi, and Pasolini's bloody handprint on its roof (there were barely any bloodstains on Pelosi). Motorcycle riders and another car had been seen following the Alfa Romeo.

In January 2001 an article appeared in La Stampa that turned conspiracy theory into a hard lead. It concerned the death in 1962, in a plane crash, of Enrico Mattei, head of the ENI energy giant, made into a famous film by Francesco Rosi, with whom Pasolini had worked.

The article's author, Filippo Ceccarelli – one of Italy's expert political journalists – cited inquiries by a judge, Vincenzo Calia, into political intrigue within ENI, which found the plane had been shot down. Judge Calia implicated the man who succeeded Mattei, Eugenio Cefis, in cahoots with political leaders. The report cited a journalist who had worked on The Mattei Affair film with Rosi, Mauro di Mauro, who was kidnapped and disappeared without trace.

Long before Calia's investigation, published in 2003, Pasolini had worked on the posthumously released book Petrolio, featuring barely disguised versions of Mattei and Cefis, and revealing knowledge of how the ENI scandal and murder went to the heart of power and the P2 Masonic lodge, of which Cefis was a founder member. "With 25 years' foresight," wrote Ceccarelli, "Pasolini the writer had been aware of the outcome of a long investigation."

Then, in 2005, the floodgates opened. Pelosi, interviewed on television, retracted his confession, saying that two brothers and another man had killed Pasolini, calling him a "queer" and "dirty communist" as they beat him to death. They frequented, he said, the Tiburtina branch of the MSI neo-fascist party. Three years later, Pelosi gave further names in an essay called "Deep Black", released by the radical publisher Chiarelettere, revealing connections to even more extreme fascist cells tied to the state secret services, saying he had not previously dared to speak, after threats to his family.

One of Pasolini's closest friends, assistant director Sergio Citti, then came to the fore to say that his own investigations had produced evidence entirely overlooked: bloodied pieces of the stick dumped close to the football pitch, and a witness ignored by the official investigation who had seen five men drag Pasolini from the car.

Citti introduced a new theme: the theft of spools from Pasolini's last film, Salò, the return of which he had tried to negotiate. The gang of thieves frequented, it emerged, the same billiard bar as Pelosi, and had called Pasolini on the last day of his life to organise a meeting. Another investigation by the writer Fulvio Abbate tied the killers to the famous Magliana criminal gang on the coastal outskirts of Rome.

Yet the case remains closed, and there are those within Pasolini's circle as well as in the political class who prefer it so. Author Edoardo Sanguineti calls the death "delegated suicide" by a sado-masochist bent on his own destruction. Pasolini's cousin Nico Naldini – also a homosexual poet – wrote in the ambiguously entitled Brief Life of Pasolini about the director's "fetishistic rituals" and "attraction for boys who made him lose his sense of danger".

Pasolini had died, so history insists, as though in a scene from one of his films. "It is only at the point of death," Pasolini had said in 1967, "that our life, to that point ambiguous, undecipherable, suspended – acquires a meaning."