Franco ruled Spain as an unopposed dictator for almost 40 years. During that time, there was nothing resembling democracy in Spain. After his death, however, Spain gradually transformed into the successful democracy it is today.
One of the main influences Franco had on this transformation was his appointment, in 1969, of Prince Juan Carlos as King of Spain. It had been one of Franco's promises to restore the monarchy, and this he did just two years before his death in 1975.
As long as Franco lived, King Juan Carlos publicly supported him. Upon his death, though, the King took action for change. He legalized new political parties and supported the writing of a new constitution that made Spain a parliamentary democracy under a constitutional monarchy, like Great Britain is.
The first elections after Franco's death in Spain were held in 1977. As an authoritarian dictator, Franco controlled every element of government, from the press to the military. Finally, Spanish people were able to vote for real choices. However, the work was not so quickly done.
Meanwhile, the King and Prime Minister wisely guided the country toward democracy without making any enormous changes. The laws, for example, stayed mostly the same, even as the form of government transitioned into a democracy. This involved writing a new constitution, which took some time. All of that was only made possible by Franco's death, which opened up new voices—in particular, King Juan Carlos's—for reconciliation and renewal of the country.