Javier Perez de Cuellar, the two-term United Nations secretary-general who brokered a historic ceasefire between Iran and Iraq in 1988, and who came out of retirement to help re-establish democracy in Peru, died on Wednesday, Peru's foreign ministry said. He was 100.

His son, Francisco Perez de Cuellar, said his father died at home of natural causes.

More:

Born in Lima in 1920, Perez de Cuellar served as the UN's fifth secretary-general between 1982 and 1991, following a long diplomatic career.

Javier Perez de Cuellar was "an outstanding Peruvian, a full-bodied democrat, who dedicated his life and work to making our country great," tweeted Peruvian President Martin Vizcarra late on Wednesday.

Perez de Cuellar had a long diplomatic career that brought him full circle from his first posting as secretary at the Peruvian embassy in Paris in 1944 to a later job as Peru's ambassador to France.

When he began his tenure as UN secretary-general on January 1, 1982, the little-known Peruvian was the compromise candidate at a time when the UN was held in low esteem.

Serving as UN undersecretary-general for special political affairs, he emerged as the dark horse candidate in December 1981 after six weeks of deadlock between UN chief Kurt Waldheim and Tanzanian Foreign Minister Salim Ahmed Salim.

Once elected, Perez de Cuellar quickly made his mark.

Disturbed by the UN's dwindling effectiveness, he sought to revitalise the world body's faulty peacekeeping machinery.

'Shaking up the house'

His first step was to "shake up the house" with a highly critical report in which he warned: "We are perilously near to a new international anarchy."

With the 1982 Israeli invasion of Lebanon, and with conflicts raging in Afghanistan and Cambodia and between Iran and Iraq, he complained to the General Assembly that UN resolutions "are increasingly defied or ignored by those that feel themselves strong enough to do so".

"The problem with the United Nations is that either it's not used or misused by member countries," he said in an interview at the end of his first year as UN secretary-general.

During his decade as UN chief, Perez de Cuellar would earn a reputation more for diligent, quiet diplomacy than charisma.

In July 1986, Perez de Cuellar underwent a quadruple coronary bypass operation, putting in question his ability to do a second term. From the outset, Perez de Cuellar had insisted that he would be a one-term secretary-general.

But he did come back for a second term after a groundswell of support for his candidacy, including from then-US President Ronald Reagan, who - in the words of the UN chief's spokesman - expressed "his personal support for the secretary-general".

All told, Perez de Cuellar's diplomacy helped bring an end to fighting in Cambodia, the 1980-88 Iran-Iraq war, and the withdrawal of Soviet troops from Afghanistan.

Shortly after midnight on January 1, 1992, he walked out of UN headquarters to his waiting limousine, no longer the secretary-general but having attained his final goal after hours of tough negotiations: a peace pact between the Salvadoran government and rebels.

After leaving the UN, Perez de Cuellar made an unsuccessful bid for Peru's presidency in 1995 against Alberto Fujimori [File: Pedro Ugarte/AFP]

After leaving the UN, Perez de Cuellar made an unsuccessful bid for Peru's presidency in 1995 against the authoritarian leader Alberto Fujimori, whose 10-year regime crumbled in November 2000 amid corruption scandals.

At the age of 80, Perez de Cuellar emerged from retirement in Paris and returned to Peru to take on the mantle of foreign minister and cabinet chief for provisional President Valentin Paniagua.

His impeccable democratic credentials lent credibility to an interim government whose mandate was to deliver free and fair elections. Eight months later, newly elected President Alejandro Toledo asked him to serve as ambassador to France.

Perez de Cuellar was married to Marcela Temple. He had a son, Francisco, and a daughter, Cristina, by a previous marriage.

His funeral will be held at Peru's foreign ministry on Friday.