Most dictatorships end in revolution, or don’t really end at all. Spain was a rare exception.

Francisco Franco died peacefully in 1975, almost four decades after his fascist forces triumphed in the Spanish Civil War. Franco believed he was handing power over to King Juan Carlos –  but Juan Carlos was sensitive to the tide of history. As soon as his mentor died, he moved to install democracy. Spain’s transition from dictatorship to democracy was remarkably smooth. And that meant Spain never truly reckoned with its past.

The film reflects Franco’s intent and betrays his vanities

Franco left his country with a lot of baggage – and a never-ending debate over what to do with it. There’s the Valley of the Fallen, the crass basilica built to honour the dead of the civil war, where Franco is currently buried – at least at the moment, as a royal decree has just been passed the Spanish parliament directing that his body be removed from the site. There are countless streets and squares named after fascists. There’s even a prominent foundation dedicated to celebrating Franco’s life and work. But one of the stranger relics Franco left behind is a film he scripted under a pseudonym in 1942, which can still be watched online in Spain.

- Meet the next top Hollywood star

- Will this heist thriller win best picture?

- The films so shocking viewers faint

Raza (Race) came with a far right pedigree. Not only was it scripted by Franco, but it was directed by José Luis Sáenz de Heredia, cousin of Primo de Rivera – the founder of the Falange, the fascist party Franco would later lead.

At first, the film seems a straightforward bit of propaganda. It follows the Churrucas, a military family from the countryside. In the first act, set in 1897, the patriarchal father dies heroically in the defence of Spain’s Cuban colony against the United States, leaving his wife to raise three sons and a daughter on her own. Decades later, one son seeks money and power in politics, while the other children pursue more traditional vocations, as soldier, priest and homemaker.

When the civil war arrives, the family is split. Pedro, the wayward son, sides with the Republican government. The others are firmly on the side of Franco. In the end, however, Pedro sees the error of his ways and recants, proving himself a true vessel of the Spanish Raza — just like the rest of the Churruca stock. Ultimately, the family is reunited by the heroism of the anointed son, José, who has risen to power as a military leader for the fascists.

It’s an allegory depicting Spain as a family torn apart by war but eventually reunited through the acts of a chosen son. As a film, it’s hardly original. But as propaganda shaped by Franco himself, it contains accidental depths: it reflects his intent, and betrays his vanities.

Shaping an image

The Churruca family is a rather favourably revised version of Franco’s own – and the hero José Churruca is a fictional alter ego for Franco himself. Both families are Galician. Both have a history of naval service but José, like Franco, served in the army. Both José and Franco saw action in Morocco and have a Republican brother who is eventually redeemed. Both put off marriage until they had finished their military duties. In short, Raza presents a narrative in which Franco, thinly disguised as José Churruca, portrays himself as the Spanish national family’s divinely ordained son.

But Raza was more than just a vanity project: it was an early attempt to shape public memory through film.

Franco wrote Raza in 1940, just after the end of the civil war. By some estimates half a million people had been killed. Both sides had committed atrocities as they purged their enemies; after Cambodia, Spain has the second largest number of mass graves in the world. Although Franco railed against foreign influence in Spain, he had received vital assistance from Italian and German fascists. And, crucially, he had toppled a democratically elected government. In other words, the war was complex. Franco wanted to provide a simpler narrative to serve his purposes: Raza would be the official version of the war.

Raza recasts Spanish history along the lines of Franco’s nationalist vision: God, family and the Spanish race. The fascists were for these things; the republicans were against them. This meant the fascists were not fighting for political power, but for the salvation of Spain. Meanwhile the republicans are agents of chaos: filthy and snarling, quaffing communion wine and machine gunning priests. The divide isn’t subtle, but powerful images linger in the mind. In one sequence a group of priests are led to a beach, their footprints fading in the wet sand as they pray, blessing themselves, as well as the men about to murder them.

One trick the film uses to lend its version of events the weight of truth is blending fictional and documentary images. Take the film’s concluding sequence, in which the nationalists enjoy a victory march at the end of the civil war. Close-ups of José Churruca in the parade’s place of honour are cut with shots from Franco’s own victory parade in 1939. Then another sequence shows a montage of the climactic moments of the film – the heroic deaths of the men of the Churruca family, for example – mixed in with images of the actual civil war. These editing sleights of hand blur the boundaries between José and Franco’s stories.

In fact, Raza was the closest thing to an autobiography that Franco produced, and he kept a close eye on its production. While it was being shot, almost every day a driver would arrive with precise instructions as to how the sequences should be. The film was also backed generously by the state, with 1,650,000 pesetas – a fortune at the time. That was, in part, spent on dozens of sets and costumes, as well as hundreds of extras and almost 45,000 metres of film, only one in 15 of which were used. Orson Welles would have smiled at such excess.

In 1950 Franco censored his own film and destroyed every old copy he could find  

Once the shooting was finished, Franco had a private viewing. Saénz de Heredia recalled: “We watched it together, Franco and I at the front, his wife and the others behind; out of the corner of my eye, under the light from the screen, I saw he was moved, and that his eyes were moist and attentive, which made me happy, because it meant it had gone well. And once it finished he told me exactly that: very good, Saénz de Heredia — you have done it.”

Yet Franco’s satisfaction was short-lived. He had started rewriting history to suit his needs — and, in time, his needs changed. By the end of the decade the fascists had lost World War Two, and Franco’s version of the civil war had to be rewritten to legitimise his power. So in 1950 Franco censored his own film and destroyed every old copy he could find. The title became Espíritu de una Raza (‘Spirit of a Race’). All fascist salutes were cut out. The enemy went from being republicans, masons, bourgeoisie and politicians to simply communists. And the jabs at the US were removed — they were soon to become Spain’s allies. Now, Raza was compatible with the new political contours of the Cold War.

It was a fittingly Orwellian twist. Franco’s myth building, of which Raza was just a part, smudged the historical record. Even now, more than 40 years after his death, there is no consensus on what the civil war and his dictatorship mean. The few polls carried out reveal a lingering ambivalence. One from 2008 showed a majority believed that Francoism had “both good sides and bad sides”. The same poll showed the public opposed to prosecution of former Franco officials, and lukewarm about a truth commission to assign responsibility for the civil war. Only a tiny minority now believe the Raza version of history, but it may have sowed just enough doubt and confusion to protect its architect’s legacy.

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.

And if you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Culture, Capital and Travel, delivered to your inbox every Friday.