Edvard Shevardnadze, who has died aged 86, was a charming but tough politician in three troublesome and frequently ruthless arenas: his native Georgia, the Soviet Union and the world of international diplomacy. He was one of the fathers of Mikhail Gorbachev's policy of perestroika, helped oversee the withdrawal of Soviet forces from Afghanistan in 1989 and was instrumental in the re-unification of Germany.
He was born in west Georgia, the son of a village schoolmaster, and was spotted by the Communist Party at the age of 18 and drawn away from a possible teaching career into the political apparatus of Komsomol, its youth wing.
In 1957, before he was even 30, he was promoted to first secretary of Komsomol, and over the next four years made a reputation as someone who could blend Moscow's demands with local aspirations. So much so that in 1961 he was drafted into the apparatus of the party itself where he repeated his success while serving as a district secretary.
Three years later, his career really took off when he was made deputy minister of the interior in the Georgian Republic. Within 12 months, in 1965, he had become minister and was in headlong conflict with criminal syndicates that combined Georgian racketeering with Communist corruption.
What really tested him was his discovery that the head of the mafia was none other than Vasili Mzhavanadze, first secretary of the Georgian Communist Party.
Mr Shevardnadze risked his career by taking the case to Moscow, but his honesty won the backing of Leonid Brezhnev, and in 1972 he ended up as Mzhavanadze's successor.
For more than a decade, Mr Shevardnadze improved the economy of Georgia, while continuing to fight extortion and protection (he was lucky to escape several assassination attempts). His responsibilities at the Republican level entailed increasing involvement in the Soviet capital.
He became a member of the central committee of the Communist Party in 1976 and a member of its politburo two years later. He already knew Mr Gorbachev as a relatively near neighbour from Stavropol in the south of Russia and, when it came to the crunch in Moscow in 1985, he supported him enthusiastically for election as general secretary.
It was not merely as a reward that Mr Gorbachev appointed Mr Shevardnadze as Soviet foreign minister. There was a desperate need to replace the ageing Andrei Gromyko, but perhaps there was also a suggestion that anyone who could handle his fellow Georgians could deal with Ronald Reagan and Margaret Thatcher.
It certainly proved so. The decision to negotiate an end to the arms race was Mr Gorbachev's, but Mr Shevardnadze was regularly at his elbow with new proposals and second thoughts. He pressed the case for particular policies such as withdrawal from the costly and unpopular war in Afghanistan and was also a useful ally in Mr Gorbachev's campaign for economic and political reform at home.
Mr Shevardnadze also became friends with US Secretaries of State George Schultz and James Baker. With Mr Baker and West Germany's Hans-Dietrich Genscher, Mr Shevardnadze is widely credited with securing Germany's peaceful unification.
As ethnic discontent began to surface in the Soviet Union, hard-core Russians reacted sharply; a demonstration in Tbilisi in April 1989 was brutally suppressed behind Mr Shevardnadze's back. He began to feel isolated in the politics of Moscow and to suspect, rightly, that Gorbachev was out of touch with the growing aspirations of the non-Russian nationalities.
Under pressure, he resigned from the foreign ministry in 1990. And then in 1991 he voluntarily withdrew from the party, in vain warning Mr Gorbachev of the danger of the coup directed against economic, political and nationality reform that was eventually attempted in August 1991.
When the Soviet Union collapsed and Mr Gorbachev was ousted in December 1991, many observers assumed Mr Shevardnadze had completed his contribution to history. But this was to forget where his roots lay. Ethnic separatism in the former Soviet Union continued and Georgia was affected as, with covert Russian support, its Abkhazi minority tried to break away.
Zviad Gamsakhurdia, the post-independence, democratically elected Georgian leader, proved unable to cope. So Mr Shevardnadze returned in 1992 and in 1993 he did a deal with Boris Yeltsin that appeared to secure the integrity and viability of an independent Georgia.
The president was initially seen as a reformer, advocating European and Nato integration and instituting some democratic changes with the aid of the World Bank and the International Monetary Fund.
Beneath the surface, however, the economy was in tatters, dragged down by Russia's economic collapse in the late 1990s. Cronyism and corruption had reached almost every corner of life. Mr Shevardnadze could not even keep the lights on, so bad were the power shortages.
Painting him as a Machiavellian schemer, Mr Shevardnadze's critics said he had become just what he had warned against: a post-Soviet dictator. In 2003, two years before the end of his mandate, protests erupted over a supposedly rigged parliamentary election.
Twenty days of mass demonstrations in Tbilisi climaxed on November of that year when Mr Shevardnadze tried to open parliament. The leader of the protesters Mikheil Saakashvili barged into the chamber, holding a rose and tailed by supporters. "Resign!" he shouted.
The president's bodyguards, guns raised, bundled him out. Mr Shevardnadze mobilised the army, but after meeting Mr Saakashvili he took to the airwaves to resign.
In retirement, he lived in seclusion but recently talked about the dangers of escalating tensions between East and West.
"The world is undoubtedly more secure than during the Cold War," he said, "But I cannot say we can rest easy. The first signs of a new Cold War have already appeared."
In 1951, he married Nanuli Tsagareishvili, the daughter of a man who was persecuted by the KGB, but it did not damage his career. She died in 2004. He is survived by his daughter and son.