Spain's transition from dictatorship to democracy in the wake of Franco's death was relatively peaceful. As the dictator had already nominated Prince Juan Carlos as his successor, there were no unseemly squabbles over which direction Spain would take after his death.
Only two days after Franco died in 1975, Prince Juan Carlos became King of Spain. Franco had expected the young prince to follow in his footsteps, but once Juan Carlos ascended to the throne, he immediately began introducing political reforms that dismantled the apparatus of the Francoist state.
Though there were some in the Spanish political establishment who strongly opposed moved towards democracy, without Franco, the man who'd ruled Spain with an iron fist for almost forty years, they lacked leadership and resolve. Opposition to the 1976 Law for Political Reform was therefore easily dealt with, and Juan Carlos had the confidence to dismiss the Francoist Prime Minister Carlos Arias Navarro. A year later, Spain held its first democratic elections for decades.
Juan Carlos's reforms formed the basis of a new constitution that was overwhelming endorsed by the Spanish people in a referendum in 1978. The endorsement of the new constitutional settlement formally established a constitutional democracy in Spain, and despite a failed coup attempt by disgruntled army officers in 1981, that settlement has remained in place ever since.