He served as Secretary-General of the United Nations (1982–91), and played a key role in the diplomatic aftermath of the Falklands War (1982) and in ending the Iran–Iraq War (1980–88). His efforts to avert the Gulf War in 1990 raised his international standing. He was an unsuccessful candidate in the 1995 Peruvian presidential election and was subsequently briefly Prime Minister (2000–01).