In 1997, Annan succeeded Boutros Boutros-Ghali as secretary-general, becoming the first sub-Saharan African to hold the office; he was elected to a second five-year term in 2001. Accessible and affably candid, combining idealism with realism, he generally was an effective consensus-builder. Annan particularly emphasized the UN's traditional obligations in the area of human rights and the newer challenges of the HIV/AIDS pandemic and international terrorism. He had some success in streamlining UN bureaucracy and controlling its budget and, until his disagreements with the United States over its invasion of Iraq, had generally improved strained relations with the United States. Annan called for overhauling the United Nations, particularly the Security Council, to make it more representative of the UN's membership and to increase the organization's effectiveness, but he was not able to get member nations to agree to significant changes in the UN's structure. He, along with the United Nations, was awarded the Nobel Peace Prize in 2001.
In 2002-3 Annan worked unsuccessfully to resolve the division of Cyprus, and in the same period his work as secretary-general was made more difficult by strong differences among the permanent members of the Security Council concerning how to handle Iraq's resistance to complying with UN weapons inspections and by the Anglo-American invasion of Iraq that began in 2003. He subsequently publicly emphasized the need for individual nations to support the United Nations and work through it instead of unilaterally and the need for revamping the Security Council.
In 2004 he publicly criticized the U.S. invasion of Iraq as having been illegal. Those comments were seen as contributing to subsequent calls for his resignation by conservative Republicans in the United States because of the United Nations' failure to prevent corruption in the Iraq oil-for-food program; UN staff and Annan's son were implicated as the investigation into the program progressed. Other nations, however, remained strong supporters of Annan. A investigration report on the oil-for-food program cleared Annan of any direct involvement but at the same time criticized him for exercising inadequate oversight. Annan was succeeded as secretary-general by Ban Ki-Moon. In 2008 Annan negotiated a power-sharing agreement between opposing parties in Kenya after a disputed election there.