The fascist dictator's shadow still hangs over Spain – but can this generation or the next finally bring catharsis to the nation?

Everything is as grey as granite. The skies, the mountains, the enormous crucifix hewn from the mountain rock – said to be one of the tallest in the world – and, in its shadow, the vast basilica of Valle de los Caídos in the Sierra de Guadarrama, near Madrid, where rests the body of General Francisco Franco, the last dictator of Spain.

Inside is no different. The church is as wide and tall as any cathedral, the distance from entrance to altar long enough to rival St Peter's in Rome. And all of it is filled with the cold, stone grey of the mountains. Above the pews, standing like sentries on their outsized columns, loom hooded statue monks, their granite hands resting on unsheathed swords, as if ready.

At the altar 14 purple-clad Benedictine monks conduct morning mass, a solemn ceremony faithful to the most unchanged Catholic ritual. An altar boy rings a bell and, at that second, the lights are turned off, filling this cavernous place with darkness – save for the beam shining on Christ upon the cross.

There is no denying the sheer, intimidating power of both spectacle and location: the Catholic-raised translator at my side gasps, confessing that he has never seen anything like it.

Spain's socialist government understands the potency of Valle de los Caídos, or Valley of the Fallen. Indeed, much energy has been devoted to taming it. Since 2009, the site has been closed to general visitors; only those attending mass are allowed. Just to make sure, a guard hands arrivals a slip of paper, reminding them that they are there "for religious purposes only".

The result is that, on this sleeting March morning, the priests outnumber the congregation, with no more than 10 people in the pews.

The official explanation is restoration work. But most believe the government wants to ward off those who might be drawn by the two words, etched into the church floor on the far side of the altar, accompanied by a simple cross, Francisco Franco: a burial spot marked on the day I visited by two bouquets, one made up of blood-red roses. Or perhaps by the plaque that honours Franco as the "caudillo de España" (military leader of Spain), who built the Valley of the Fallen in 1959, or by the sight of the Franco crest on the plaza walls outside.

To be safe, on 20 November – the anniversary of the dictator's death in 1975 – visitors' car boots are checked to ensure they are not bringing in placards or flags associated with Franco's fascist Falange party.

The government is considering legislation to deal with the Valle de los Caídos, appointing a panel of historians to advise. Should there, for example, be an exhibition detailing the monument's history, explaining that much of it was built by up to 20,000 prisoners drawn from those Franco had defeated?

The nervousness that surrounds the monument, an hour or so outside Madrid, is proof of the long shadow still cast by the event that defined 20th-century Spain: the civil war that began 75 years ago, when Franco mounted an army rebellion against the democratically elected government of the republic. Officially, the Spanish civil war ended in 1939, but as the acclaimed novelist Javier Cercas puts it when we meet in his Barcelona studio: "This is the past that has not passed. The civil war is still here."

Visit the fashionable La Casa Encendida gallery in Madrid and you can see the evidence. An exhibition by photographer Gervasio Sánchez on "the disappeared" shows bereaved families exhuming the remains of their loved ones from unmarked graves – something that has become a national phenomenon in Spain in the past decade.

In village after village, the children and grandchildren of republicans who were executed and their bodies dumped have sought to find them and give them a decent burial.

Those efforts now have state blessing, thanks to the law on historical memory passed by the Zapatero government in 2007, but they have sparked enormous controversy. Old wounds have been reopened: I was told of one village where a trio of elderly women broke into pro-Franco songs as the bones of long-dead, but still-hated, republicans were lowered into the ground.

Or witness the fate of Spain's best-known judge, Baltasar Garzón, who led the 1998 effort to bring Augusto Pinochet to justice. Having taken on corrupt politicians, international drug-traffickers and terrorists, he finally met his match in the ghosts of Spain's recent past. Last year he was suspended by the country's supreme court after he opened an investigation into the estimated 113,000 people executed by Franco's forces during and after the war.

To be fair, even many republican sympathisers agree that Garzón had overstepped the line, accusing him of folly in pursuing a crime whose chief perpetrator, Franco, is long dead.

But there's no denying the rawness of the nerve he touched. One group agitating in Garzón's defence brands its website Franco no ha muerto - Franco is not dead.

Any attempt to explain the grip the Franco period still exerts starts with the simple matter of chronology. While Germany and Italy were rid of their dictators by 1945, the caudillo ruled 30 years longer. Whatever process of stocktaking their fellow western Europeans undertook was delayed for the Spanish by three decades.

More deeply, Spain differs because while Hitler and Mussolini were utterly defeated, Franco won. "Germans know that they were on the wrong side," says Javier Cercas, whose million-selling 2001 novel, Soldiers of Salamis, grappled with how Spain remembers its civil war – and whose mass success proved how much the question still burns. "There was no blurring. In Spain, there's blurring. On German TV you can't see people saying Hitler was great. You can in Spain," he says, speaking of a Francoist nostalgia that has not been entirely extinguished.

Part of it is generational, with grandchildren eager to look into experiences that were too close for their parents. Part of it is scale. With so much attention devoted to the crimes of Nazism, it's easy to forget the extent of the horrors committed in Spain.

Nigel Townson, a British-born historian based in Madrid, says that the steady flow of revelations from the archives have shocked the Spanish, concluding that, with 50,000 killed even after the civil war had ended, Franco's rule amounts to "the most severe peacetime repression in any country in Europe, barring the Soviet Union".

What all agree on is that Spain's "pact of silence" is now over. The phrase is widely misunderstood, thought to refer to an all-pervasive omerta that barred anyone in Spain speaking of the Franco past after his death, thereby keeping a lid on memories that was only recently blown off. "Bullshit," says Cercas. "Nonsense," says Townson, noting the 3,000 books published in Spanish on the civil war between 1975 and 1995 and the slew of TV documentaries, movies and newspaper articles that accompanied them. The real "pact of silence" was among the political classes, who agreed not to use the past as a weapon against each other during the post-1975 transition from dictatorship to democracy. Central to that pact was the 1977 amnesty law, which has ensured there has not been a single prosecution – not of Franco's men, nor of the republicans accused of massacres of their own (part of the case against Garzón was that he was breaching the 1977 amnesty).

Among the writers and intellectuals who debate such matters, many defend that accord of silence. "We had to make an agreement in order not to fight another civil war," says the historian Jorge Reverte, who cheerfully describes himself as a red as we stand gazing at the iconic image of the 1936-39 conflict, Pablo Picasso's Guernica, which stills draws awestruck crowds at Madrid's Reina Sofía museum.

That political armistice, broken in the last few years, was doubtless necessary. But it has come at a price.

In order to have peace, many in Spain feel they have sacrificed justice. The murderers went unpunished and Franco died in his bed.

What's more, Spain has lacked the catharsis that can come with a full reckoning with the past. There has been no equivalent of Germany's Willy Brandt moment, when the then-chancellor sank to his knees in atonement for the Holocaust.

Could one yet come? Not from the rightwing People's party, which may well form Spain's next government. Several times I was told that too many luminaries of the PP have family ties with the Franco regime: they are the sons and daughters of those who served the caudillo. So far they have been wary of attacking Francoism for fear of seeming to condemn their own forebears.

The church won't do it. Franco was, above all, a nationalist, authoritarian Catholic – and Francoist nostalgia is said to endure in Spain's ultra-traditionalist church.

The obvious candidate is King Juan Carlos I, widely credited with holding the country together in the precarious years of transition and standing firm during the abortive coup attempt of 1981. But he too is hardly able to make the move. For he was Franco's chosen heir, whose coronation helped reassure Franco supporters, allowing them to accept the move to democracy.

The task may fall instead to his son, Felipe. Or maybe, wonders Cercas, the healing can only come when "the great-grandchildren" take over – when every last person who lived through those events is as dead and silent as the Valley of the Fallen.