The Pact of Forgetting () is the political decision by both leftist and rightist parties of Spain to avoid confronting directly the legacy of Francoism after the death of Francisco Franco in 1975.
The Pact of Forgetting was an attempt to move on from the Civil War and subsequent repression and to concentrate on the future of Spain.
In making a smooth transition from autocracy and totalitarianism to democracy, the Pact ensured that there were no prosecutions for persons responsible for human rights violations or similar crimes committed during the Francoist period.
On the other hand, Francoist public memorials, such as the mausoleum of the Valley of the Fallen, fell into disuse for official occasions. Also, the celebration of "Day of Victory" during the Franco era was changed to "Armed Forces Day" so respect was paid to both Nationalist and Republican parties of the Civil War.

The pact underpinned the transition to democracy of the 1970s and ensured that difficult questions about the recent past were suppressed for fear of endangering 'national reconciliation' and the restoration of liberal-democratic freedoms. Responsibility for the Spanish Civil War, and for the repression that followed, was not to be placed upon any particular social or political group. "In practice, this presupposed suppressing painful memories derived from the post civil war division of the population into 'victors' and 'vanquished'". While many historians accept that the pact served a purpose at the time of transition, there is more controversy as to whether it should still be adhered to. Paul Preston takes the view that Franco had time to impose his own version of history, which still prevents contemporary Spain from "looking upon its recent violent past in an open and honest way".

Historical background
"It is estimated that 400,000 people spent time in prisons, camps, or forced labor battalions". 
Some historians believe that the repression committed by the Francoist State was most severe and prevalent in the immediate years after the Spanish Civil War and through the 1940s. During this time of the repression, there was an escalation of torture, illegal detention, and execution. This style of repression remained frequent until the end of the Spanish State. Especially during 1936–1939, Nationalist Forces seized control of cities and towns in the Franco-led military coup and would hunt down any protesters or those who were labeled as a threat to the government and believed to sympathize with the Republican cause. "Waves of these individuals were condemned on mere hearsay without trial, loaded onto trucks, taken to deserted areas outside city boundaries, summarily shot, and buried in mass, shallow graves that began dotting the Spanish countryside in the wake of the advancing Nationalist."

Advances in DNA technology gave scope for the identification of the remains of Republicans executed by Franco supporters.
The year 2000 saw the foundation of the Association for the Recovery of Historical Memory which grew out of the quest by a sociologist, Emilio Silva-Barrera, to locate and identify the remains of his grandfather, who was shot by Franco's forces in 1936.
There have also been some notable references to the Civil War in the arts in recent years (for example, Javier Cercas' 2001 novel Soldiers of Salamis). However, the subject of the Civil War had not been "off limits" in the arts in previous decades, and arguably the pact is mainly a political construct. In 2006, two-thirds of Spaniards favored a "fresh investigation into the war".

Legal basis
The pact was given a legal basis in the Spanish 1977 Amnesty Law.

The pact was challenged by the socialist government elected in 2004, which under prime minister Jose Luis Rodriguez Zapatero passed the Historical Memory Law. Among other measures, the Historical Memory Law rejected the legitimacy of laws passed and trials conducted by the Francoist regime.  The Law repealed some Francoist laws and ordered the removal of remaining symbols of Francoism from public buildings.

The Historical Memory Law has been criticised by some on the left (for not going far enough) and also by some on the right (for example, as a form of "vengeance").
After the Partido Popular took power in 2011 it did not repeal the Historical Memory Law, but it closed the government office dedicated to the exhumation of victims of Francoist repression.  Under Mariano Rajoy, the government was not willing to spend public money on exhumations in Spain, although the Partido Popular supported the repatriation of the remains of Spanish soldiers who fought in the Blue Division for Hitler.

In 2010 there was a judicial controversy pertaining to the 1977 Spanish Amnesty Law. Spanish judge Baltasar Garzón challenged the Pact of Forgetting by saying that those who committed crimes against humanity during the Spanish State are not subject to the amnesty law or statutes of limitation. Relatives of those who were executed or went missing during the Franco regime demanded justice for their loved ones. Some of those who were targeted and buried in mass graves during the Franco regime were teachers, farmers, shop owners, women who did not marry in church and those on the losing side of war. However, the Spanish Supreme Court challenged the investigations by Garzón.  They investigated the judge for alleged abuse of power, knowingly violating the amnesty law, following a complaint from Miguel Bernard, the secretary general of a far-right group in Spain called "Manos Limpias".  Bernard had criticized Garzón by saying:

Although Garzón was eventually cleared of abuse of power in this instance, the Spanish judiciary upheld the Amnesty Law, discontinuing his investigations into Francoist crimes.

International implications
The United Nations has repeatedly urged Spain to repeal the amnesty law, for example in 2012, and most recently in 2013.
This is on the basis that under international law amnesties do not apply to crimes against humanity.
According to the International Covenant on Civil and Political Rights, Article 7, "no one shall be subjected to torture or to cruel, inhuman or degrading treatment or punishment". Furthermore, Judge Garzón had drawn attention to Article 15, which does not admit political exceptions to punishing individuals for criminal acts. However, this is not a uniform practice, there have been cases where the U.N. said that an amnesty is important in order to restore peace and help make the government stronger.
It has also been argued that crimes during the Franco era, or at least those of the Civil War period, were not yet illegal. This is because international law regarding crimes of humanity developed in the aftermath of the Second World War and for crimes prior to that period the principle of nullum crimen sine lege, or "no crime without a law", could be said to apply.

An Argentinian judge is investigating Franco-era crimes under the international legal principle of universal justice.

In some countries the Spanish agreement not to prosecute politically-motivated wrongdoing juridically and not to use the past in daily politics was seen as the example to follow. This was especially the case in countries which like Spain were undergoing the process of transition from dictatorship to democracy, e.g. in Poland. In the 1990s the progressist media hailed the Spanish model, which reportedly refrained from revanchism and from the vicious circle of “settling accounts”. The issue was highly related to the debate on “decommunization” in general and on “lustration” in particular; the latter was about measures intended against individuals involved in the pre-1989 regime. Liberal and left-wing media firmly opposed any such plan, and they referred the Spanish pattern as the civilized way of moving from one political system to another. In a debate about transition from communism, held by two opinion leaders Vaclav Havel and Adam Michnik, the Spanish model was highly recommended. Later politics of Zapatero was viewed as dangerous “playing with fire” and pundits ridiculed him as the one who was “rattling with skeletons pulled from cupboards” and “winning the civil war lost years ago”; they compared him to Jarosław Kaczyński and leaders of allegedly sectarian, fanatically anti-communist, nationalistic, Catholic groupings. However, during the 2010s the left-wing media were gradually abandoning their early criticism of Zapatero; they were rather agonizing about Rajoy and his strategy to park the “historical memory” politics in obscurity. With the threat of “lustration” now gone, progressist authors have effectively made a U-turn; currently they are rather skeptical about the alleged “pact of forgetting” and advocate the need to make further legislative steps advanced by the Sánchez government on the path towards “democratic memory”. The Polish right, which in the 1990s was rather muted about the solution adopted in Spain, since then remains consistently highly critical about the “historical memory” politics of both PSOE and PP governments.

See also 
Franquismo sociológico
Vergangenheitsbewältigung
Truth and reconciliation commission

References

Politics of Spain
Spanish transition to democracy
Francoist Spain