When the Spanish dictator Francisco Franco died on 20 November 1975, no commentator predicted the central role that would be played in the country's political development by Adolfo Suárez González, a young bureaucrat of the country's single party, the Falange, or Movimiento. Many expected a bloodbath and only a few harboured hopes that the passage to democracy might be managed through negotiation between the more liberal supporters of the dictatorship and the more moderate members of the opposition. In the event, Suárez, who has died aged 81, led and ensured that transition as Spain's first elected prime minister after Franco, but was not himself able to flourish in the new political environment.

Franco's last prime minister, the hardline Carlos Arias Navarro, had taken reluctant steps towards cosmetic reform. In March 1975, he brought a relative liberal, Fernando Herrero Tejedor, into the key ministerial post of head of the Movimiento. But when Herrero Tejedor was killed in a car crash three months later, the way was opened for Suárez.

Born into the rural middle class in Cebreros, a small town in the province of Ávila, Suárez inherited his parents' fervent Catholicism, took a law degree at the University of Salamanca, and got a job in the town hall of Ávila in 1955. When Herrero Tejedor was appointed civil governor of Ávila, Suárez became his private secretary. He joined Opus Dei, and in summer 1961 married Amparo Illana Elortegui. When Herrero Tejedor was made vice-secretary of the Movimiento in 1961, Suárez became his chef de cabinet. In 1965, he was made programme director of the state broadcaster TVE and two years later was "elected" as procurador (deputy) for Ávila in Franco's Cortes. In 1968, he became civil governor of Segovia. As he neared the top, he attracted the attention of Franco and used his television work to befriend Prince Juan Carlos. Suárez was made director general of TVE in 1969 and used his power to promote the prince.

On Herrero Tejedor's death, Suárez was his logical successor as head of the Movimiento, but Franco distrusted him. Suárez declared that "the monarchy of Don Juan Carlos de Borbón is the future of a modern, democratic and just Spain" and Juan Carlos secured him a good job in the state telephone monopoly. The prince knew that bloodless change would have to be effected by people who knew how to manipulate the structure of the regime. His strategist would be Torcuato Fernández-Miranda, but Suárez's dynamic and youthful image fitted him for a crucial role, too.

When Franco died, powerful elements of the old regime, especially in the army, regarded the new King Juan Carlos with suspicion. He was obliged to keep Arias as prime minister, but, crucially, he secured the dual appointment of Fernández-Miranda as president of the Cortes and of the Consejo del Reino (the council of the kingdom), with Suárez as his cabinet mole in the key post of head of the Movimiento. Suárez seized the opportunity, handling particularlycoolly two crises in the north. As acting minister of the interior, he prevented a potential massacre after police brutality had provoked leftwing protests that the army was keen to crush.

Having already established contacts with the Christian Democrat opposition, Suárez became ever more the focus of royal hopes, especially after a brilliant speech in the Cortes arguing that the straitjacket of Franco's laws needed to adapt to Spain's pluralist society. At the beginning of July 1976, Juan Carlos requested the resignation of Arias. Fernández-Miranda then stage-managed the drawing-up of the three-man shortlist from which the king would select his new prime minister, ensuring that Suárez's name appeared. The king shocked the political world by replacing Arias with Suárez rather than with a more senior candidate. The fate of the monarchy depended on Suárez rather than with a more senior candidate's success or failure: Suárez himself commented years later that the king had "risked his crown".

With the king's approval, Suárez picked a government that was ridiculed as a "cabinet of assistant lecturers". Nonetheless, the unchanged military ministers aside, Suárez's team of conservative Catholics was committed to reform. His strategy would be based on speed, introducing measures faster than the Francoist establishment could respond. His programme recognised popular sovereignty, promising a referendum on political reform and elections before 30 June 1977. Throughout the summer of 1976, Suárez talked to opposition figures. Concerned that the pressure for change from the left might provoke a brutal reaction from the armed forces, Suárez met senior generals on 8 September and explained the reforms. They were happy to hear him say that the Communist party could not be legalised.

On 21 September he was challenged by the resignation of the vice-president and minister of defence, General Fernando de Santiago, outraged by plans to legalise the unions. It was the beginning of the military hostility that was to bedevil his time in office. Two months later he steered the text of the political reform through the Francoist Cortes, then headed for a referendum. By permitting the Socialist party to convene in Madrid on 5 December, he both courted the opposition and boosted a potential rival to the Communists.

Despite abstention calls from the opposition, political reform was approved by 94% in the referendum., and Suárez met opposition representatives on 11 January 1977. He showed great steadfastness in the face of the kidnapping of senior Francoist figures by the ostensibly Marxist-Leninist splinter group Grapo, believed by some ministers to be infiltrated by, or even the creation of, the extreme rightt and elements of the police. On 24 January 1977 in Madrid, ultra-right terrorists murdered five people, four of whom were Communist labour lawyers. At their funeral, the party organised a gigantic display of silent solidarity.

Impressed by the demonstration of Communist strength and discipline, Suárez opened secret negotiations with their leader, Santiago Carrillo, that paved the way to legalising the Communist PCE on 9 April. This infuriated reactionary military officers, prompting a rash of golpismo, or military conspiracy.

With elections ahead, in the spring of 1977 Suárez united groups of progressive Christian Democrats and conservative Social Democrats into the Unión de Centro Democrático (UCD), and Francoist elements of the Movimiento joined Suárez, in the hope of electoral victory. Horse-trading concluded only five days before candidate lists closed. Suárez's final lists were dominated by men who had served Franco. The UCD resembled a bus, its passengers united not ideologically, but by the route to victory.

The run-up to the elections of 15 June assumed an air of popular fiesta, but Suárez's campaign concentrated on the media, where his resources were virtually unlimited. His other advantages were overwhelming. The banks funded a huge advertising campaign. Every housewife in the land was sent a letter from Suárez outlining his plans to improve living standards and the UCD propaganda machine worked especially hard to build on Suárez's film-star looks. Sixty per cent of UCD voters were to be women. Its privileged resources carried Suárez to victory with 34.5% of the vote; the Socialists polled 29.2%.

Suárez had thrived within the system which had trained him, Franco's corrupt and nepotistic Movimiento. Now he had to deal with a diverse party and the sniping of disgruntled army officers and Basque terrorists. Although his reform was ample for the conservative middle classes, the wider hunger for change went unsatisfied. Popular enthusiasm soon turned to popular disenchantment. Moreover, his authoritarian treatment of UCD deputies led to the resentment that eventually broke the party.

Nevertheless, in the first legislature there were achievements. With inflation at 40%, under the all-party Moncloa pacts of October 1977 the left agreed to an austerity programme in return for reform. Through devaluation and wage control, inflation dropped to 16% and the peseta stabilised, but unemployment rocketed and reforms were sparse.

Suárez also started the federalisation of the Spanish state. The elections in Catalonia had been won by the left, and the new assembly of Catalan parliamentarians was lobbying for autonomy. To avoid dealing with a Socialist president, Joan Reventòs, Suárez negotiated with Josep Tarradellas, the president in exile.

Unfortunately, the establishment in 1978 of the Basque general council under the presidency of the Socialist Ramón Rubial did nothing to calm the nationalist aspirations of the Basque separatist movement, Eta. To dilute the impact of Catalan autonomy, Suárez's café para todos (coffee for all) initiative gave limited autonomy to 12 other regions, creating problems for the future.

To his everlasting credit, Suárez did not interfere in drafting the constitution for the new democracy, although consensus with the Socialists caused difficulties within his own party. The approval of the constitutional text by the congress and senate on 31 October 1978 and its ratification by the referendum of 6 December marked the peak of his achievement. After victory in the elections of 1 March 1979, Suárez announced that "consensus is over". He refused to permit a debate on the government's programme and for the rest of his second administration rarely appeared in parliament. Moreover, he tried to establish greater control over the UCD by excluding from his cabinet the "barons"– the leaders of its principal factions. He failed; and Andalucía and Galicia were pressing for autonomy statutes like those conceded to the Basques and Catalans.

Although Suárez continued to show his gift for backroom negotiation, his virtual withdrawal (partly impelled by a chronic dental condition) gave Spaniards the impression of desgobierno – of being ungoverned. Terrorism and military conspiracy introduced an element of fear into everyday life. Suárez was giving out an impression of apathy by his seeming reluctance to communicate with party, parliament or people. When in May 1980 the Socialist leader Felipe González presented a devastating censure motion, Suárez did not even reply.

For all his achievements in creating the institutional framework of a democratic Spain – elections, a constitution and regional autonomy – Suárez left many Spaniards with the impression that little had changed since Franco. His charm and negotiating skills were lost in the parliamentary arena and he had few solutions to economic recession and terrorism. Hostility within his party grew after a series of disastrous electoral setbacks in Andalucía, the Basque country and Catalonia. His popularity in the polls was plummeting and he became the hermit of the Moncloa palace.

In September 1980, his right-hand man, Fernando Abril Martorell, resigned. Suárez's failure, the following month, to go the scene of a gas explosion in the Basque country that had killed 48 children or to attend the funerals of two party colleagues assassinated by Eta, was condemned as callous by the press and other parties. Anticipating trouble at an imminent party conference and aware of a military conspiracy, Suárez resigned in a televised speech on 29 January 1981, declaring: "I do not wish that, because of me, the democratic regime of co-existence should once more be a parenthesis in the history of Spain."

Three weeks later, in an attempted military coup, Colonel Antonio Tejero took the Cortes by force. Suárez displayed remarkable physical courage, being one of only three parliamentarians who refused to obey Tejero's order to lie on the floor.

In 1982, Suárez left the UCD to form a new party, the Centro Democrático y Social (CDS). The UCD was annihilated in the October elections, gaining only 11 seats; the CDS won two. He left politics, concentrating on his law practice and caring for his wife and his daughter, Mariam, who both died of cancer: Amparo in 2001 and Mariam in 2004.

Latterly, just walking down the street in Madrid, he was applauded by passers-by grateful for his contribution to the process of transition to democracy.

King Juan Carlos made him Duke of Suárez in 1981 and in 2007 named him Knight of the Order of the Golden Fleece. In 2005, his son Adolfo announced that Suárez was suffering from Alzheimer's disease and could no longer remember having been prime minister. He is survived by Adolfo, another son, Javier, and his daughters Sonsoles and Laura.

• Adolfo Suárez González, Duke of Suárez, politician and lawyer, born 25 September 1932; died 23 March 2014