Javier Perez de Cuellar, who died last Wednesday aged 100, was an accomplished Peruvian diplomat who was secretary-general of the United Nations from 1982 to 1991, and later his country's prime minister.
He was at the centre of world events, from the Falklands conflict - which he did his best to halt - to the fall of the Iron Curtain, the end of apartheid, the Gulf War and the break-up of Yugoslavia.
Discreet, bookish, courtly, tenacious, even-handed and patient, Perez attempted to resolve more conflicts than any other secretary-general. The Middle East question - which he regretted was "no nearer a solution" despite having taken up more of the UN's time over four decades than any other issue - defied his efforts. Yet he could claim credit for the end of the Iran-Iraq War, peace in Cambodia and Angola, elections in Namibia and an apparent settlement in Afghanistan.
Working with Iran and Syria, he secured the release of Terry Waite, John McCarthy and other hostages in Beirut. He sent experts to investigate Saddam Hussein's gassing of the Kurds and arbitrated between France and New Zealand over the sinking of the Rainbow Warrior.
Succeeding the pedantic and subsequently disgraced Kurt Waldheim, Perez took a low-key approach. At the UN's New York headquarters he preferred not to use his personal lift and dining room. His deadpan style and expression were reinforced by a stroke suffered in 1977.
Perez had been in office barely three months when, at the end of March 1982, Argentina invaded the Falklands. He appealed for peace, contacted the two sides, then left the initial diplomacy to US secretary of state Alexander Haig. When Haig's mediation failed and Washington - and the Security Council - sided with Britain, he proffered his good offices.
Crises apart, Perez's main preoccupation was the UN's worsening financial plight. This was partly due to the US Congress withholding part of America's contribution, and to the Kremlin refusing to pay for peacekeeping, for which the UN was awarded the Nobel Peace Prize in 1988.
He urged the superpowers to pay up, and in 1986 pushed a $30m austerity package through the General Assembly after two weeks of wrangling.
Javier Felipe Ricardo Perez de Cuellar de la Guerra was born in Lima on January 19, 1920. His businessman father, descended from Spanish nobility, died when he was four. Javier wanted to be a musician but was told music was "for girls", so he read law at the Catholic University in the city. In 1940 he joined the foreign ministry as a clerk.
He was a junior delegate to the first UN General Assembly in London in 1946, then served in Paris, London and La Paz, before becoming counsellor at Peru's embassy in Brazil.
He returned home in 1961 as political director at the foreign ministry then, after two years as ambassador to Switzerland, became its secretary-general in 1966.
In this capacity, Perez formalised relations with the Soviet Union, being posted to Moscow as ambassador in 1969. In 1971 he became Peru's UN ambassador.
He was president of the Security Council for the month of July 1974, and when President Makarios was overthrown and Turkey invaded, he was appointed Waldheim's special representative on Cyprus.
After a year as ambassador to Venezuela, Perez returned to the UN in 1979 as under secretary-general for special political affairs.
After the Soviet invasion of Afghanistan, he spent nine months shuttling between Moscow, Rawalpindi and Tehran, trying to mitigate its effects.
He remained welcome in each city.
Waldheim wanted a third five-year term, but developing countries preferred the Tanzanian Salim Salim, whom America could not forgive for leading jubilation at the UN when George H W Bush failed to stop communist China being seated.
An empty Kleenex box was circulated within the Security Council. America put in a veto on Salim, China a veto on Waldheim and Russia a veto on Prince Sadruddin Aga Khan. When new candidates were suggested, Perez had no vetoes.
Within weeks, Israel launched an incursion into Beirut, and the UN disarmament conference in New York collapsed. Then Argentina invaded the Falklands.
During Perez's second term the Cold War ended, the Berlin Wall came down, and he looked set to retire on a note of hope.
Then, in August 1990, Saddam annexed Kuwait. Perez persuaded the US not to respond unilaterally and intervened with Saddam to prevent foreigners being used as human shields.
Round after round of talks with Iraq's foreign minister, Tariq Aziz, produced no progress. Then in January 1991, the Security Council having set a deadline for Iraqi withdrawal, Perez delivered an 11th-hour appeal to Saddam in Baghdad.
He returned lamenting: "I wanted to dance, but I couldn't find any nice lady for dancing with."
Saddam declared: "There can be no bargaining over the rights of the Arab nation."
The darkest cloud on the horizon as he left, Iraq apart, was fighting in the former Yugoslavia.
Then, at 74, Perez was persuaded to run for the presidency of Peru against the flamboyant incumbent Alberto Fujimori but came a poor second.
During the turbulent period following Fujimori's subsequent resignation over corruption charges, Perez, then 80, served for eight months as prime minister and foreign minister.
Javier Perez de Cuellar married, first, Yvette Roberts, with whom he had a son and a daughter. After their divorce, he married secondly, in 1975, Marcela Temple Seminario. She died in 2013.