On Jan. 15, 2016, Australian lawyer Philip Alston paid a visit to U.N. Secretary-General Ban Ki-moon on his 38th-floor office at U.N. headquarters. Alston, the U.N. special rapporteur on extreme poverty and human rights, was preparing a report that would castigate the United Nations for skirting responsibility for introducing cholera into Haiti more than five years earlier. If Ban hoped to salvage the world body’s good name, as well as his legacy, he had better move fast to right a historical wrong.

“It would be a great pity to go out on this note,” Alston said he later told Ban in what amounted to a thinly veiled warning.

For a man weighing a likely run for the South Korean presidency, the hint of a potential scandal proved persuasive. Ban, 72, subsequently ordered a review of the U.N.’s response to Haiti’s cholera epidemic, which has killed more than 9,000 Haitians.

And so on Dec. 1, after months of deliberation, Ban offered an extraordinary apology to Haitians on behalf of the U.N., ending years of denials about the organization’s complicity in the cholera epidemic. In a carefully crafted statement that acknowledged the U.N.’s moral, if not legal, responsibility, Ban said he was “profoundly sorry” and pressed U.N. member states to cough up as much as $400 million to treat and cure Haiti’s cholera victims.

The effort marked the first stage in an intensive effort to shore up Ban’s legacy before he steps down as the world’s top diplomat at the end of December.

Having endured a withering barrage of attacks on his leadership from his earliest days at Turtle Bay, Ban has notched some noteworthy late victories. He browbeat states into ratifying the Paris climate accord well ahead of schedule, and promoted gay rights within the U.N. bureaucracy and with conservative governments.

But the list of crises he will leave for his successor, former Portuguese Prime Minister António Guterres, is daunting. Syria is in free fall, North Korea’s nuclear arms program is advancing, South Sudan faces the specter of genocide, unprecedented numbers of refugees are on the run, and Islamist extremists are spreading terror throughout the globe. “We have collectively failed the people of Syria,” Ban told reporters at his final news conference on Dec. 16. “Aleppo is now a synonym for hell.”

The organization Ban set out to reform 10 years ago, meanwhile, is in many ways in worse shape than when he started, handicapped by great power divisions that have thwarted peace efforts from Syria to Ukraine and raised the specter of a new Cold War between Russia and the West.

Ban’s U.N. has also been beset by self-inflicted wounds: a glacial personnel system that has confounded the efforts of United Nations peacemakers and staff missions. A broken patchwork of watchdog programs that could not dependably root out corruption, expose sexual misconduct by U.N. blue helmets, or protect whistleblowers. And, indefensibly, the U.N.’s denial of responsibility for Haiti’s cholera epidemic.

“The most telling things about his legacy are the things he has the most control over, are the very things that have experienced some of the greatest failures,” said Bruce Rashkow, a former U.S. and U.N. legal advisor who has championed U.N. oversight reforms since the early 1990s.

Critics also faulted Ban for lacking the qualities — charisma, intellectual agility, and creativity — to make a great peacemaker. He has largely subcontracted mediation to a succession of special envoys, including former Secretary-General Kofi Annan, to tackle peace efforts from Kenya to Syria. “Thank God he did delegate because as you can see, he is very weak on thinking on his feet,” said a top advisor. “That’s not his thing.”

Ban has bridled at the criticism, telling his aides that he has long been unfairly maligned by Western media because he doesn’t speak “Oxford English.” But his anger often gets taken out on his subordinates: Ban frequently erupts into fits of anger when things go wrong at staff meetings or if he is being challenged by subordinates, leaving aides to keep their heads down to avoid catching his eye.

“It’s like when you’re told ‘Don’t look a bear in the eye, or he’ll think you’re challenging him,’” said one advisor.

Despite such setbacks, the story of Ban’s rise to the world’s top diplomatic job is as inspirational as it is improbable. At age 6, Ban and his family fled an offensive by North Korean troops, seeking refuge in his grandparents’ mountain home. Cut off from supplies and forced to endure bitter winter cold, Ban and his family survived on American handouts — rice, flour, powdered milk, and hand-me-down clothing — and studied math and science in books donated by UNESCO.

Today, Ban still keeps an old, grainy, black-and-white photograph of himself as a boy with two younger brothers, a cousin, and another boy; it reminds him of the hardships of his youth. They stand together in an apple orchard, stoic and joyless, their jeans patched, their shirts torn and tattered around the wrists. That experience gave Ban searing insights into the trauma and deprivations of war.

“Life was very, very hard at that time,” he told Foreign Policy, recalling that local authorities once instructed the children in his village to come to the town hall to witness a display of large numbers of dead North Korean soldiers.“It was part of the anti-communism education. We had to see all these dead bodies. It was terrible.”

A model student, Ban finished at the top of his class in his elementary, middle, and high school before embarking on a diplomatic career that mirrored South Korea’s trajectory from a broken post-war nation to a major industrial powerhouse in which he served as foreign minister.

As secretary-general, Ban has retained the habits of that diligent student, reading stacks of talking points and briefing papers late into the night, underlining key passages in green, yellow, and red markers. Ban prides himself on keeping a taxing work schedule and forgoing vacations.

In March, Ban’s staff urged him to take advantage of a four-hour break in his Middle East travels to tour Jordan’s Petra, one of the world’s most famous archeological wonders. King Abdullah II bin Al-Hussein would be there to accompany the U.N. chief. But Ban declined. Instead, he arranged a visit with World Bank President Jim Yong Kim to see the Zaatari refugee camp on the Jordanian border with Syria.

Left: U.N. Secretary-General Ban Ki-moon listens to a teacher during a visit to a U.N.-run school in the Zaatari refugee camp on Dec. 7. Right: Syrian refugees greet Ban as he arrives at the camp. (Photo credit: KHALIL MAZRAAWI/AFP/Getty Images)

In his wood-paneled office towering over Manhattan’s East River, Ban has been packing his boxes for the move back to South Korea and reflecting on the next stage in his political future.

It’s hardly a secret that he aspires to become president of South Korea, where he has been long viewed as an undeclared front-runner. One aide said he was “1,000 percent sure” Ban has been secretly laying the groundwork for a political race for more than a year — despite his frequent statements to the contrary.

But in recent months, an influence-peddling scandal back home has tainted the ruling Saenuri Party, which was expected to support Ban’s campaign. The controversy has fueled calls for the resignation of South Korea’s conservative president, Park Geun-hye, and caused Ban’s poll numbers to slip for the first time behind the leading opposition candidate.

Ban told FP that he is “seriously considering” a run, suggesting he felt an obligation to lead his country out of a series of crises. The South Korean economy is buffeted by new economic headwinds and the prospects of the country’s first democratically elected leader to be impeached in disgrace. The election of U.S. President-elect Donald Trump, who has raised questions about America’s commitment to its security agreements with allies, has introduced new uncertainty.

Ban acknowledged that there are serious hurdles to a successful campaign. The ruling party, he said, is on the verge of collapse, or splitting into two warring factions of Park loyalists and those who oppose her. Ban said it would be “extremely difficult” to start his own party at this late stage. But he said there is a move afoot to create a third party, presenting a possible platform for a Ban campaign.

“I’m becoming more and more serious now,” Ban said in a Dec. 16 interview with FP. “There are a lot of people asking for me to positively consider and work for the country. I have to be seriously thinking … how best I should contribute to my country.”

“The Korean government and country is going through a very, very difficult situation in terms of change of administration in the United States,” he added.

Ban reflected on the strains of his U.N. tenure and voiced frustration with his efforts to prod autocrats, from North Korean leader Kim Jong Un to Syrian President Bashar al-Assad, to place the interests of their people above their personal ambitions for power. In the early stages of the Syrian war, Ban said he struggled to persuade Assad to enter a power-sharing pact with the country’s anti-government groups.

Ban greets South Korean President Park Geun-Hye at the presidential Blue House in Seoul on May 20, 2015. (Photo credit: JUNG YEON-JE/Pool/Getty Images)

“There was no point speaking with him,” Ban recalled. “At the beginning of this crisis I spoke five times [to Assad], and each time he was lying. I was advised by my senior advisors, ‘Don’t speak to him, and don’t meet him.’”

The break came with a cost. Ban found himself with little leverage or influence over the Syrian leader, and tasked a succession of envoys to try to cut a political deal with Assad. “He was so tough about Bashar al-Assad that he dealt himself out of the game, probably to the mutual relief of both,” said a senior advisor.

In assessing Ban’s tenure, some observers noted that on matters of war and peace, from Syria to Ukraine, the secretary-general is largely only a figurehead — a cheerleader at best, but often a bystander to the decisions of the world’s biggest powers. However, Ban deserves credit for doggedly pressing from his first days in office for international action to limit greenhouse gases and helping usher the Paris climate accord’s swift entry into force in November.

“Climate is the crown jewel of Ban Ki-moon’s legacy,” said Bob Orr, a senior advisor for the U.N. chief, whom he credited in 2007 with persuading then-U.S. President George W. Bush, a skeptical Texas oil man, not to derail climate negotiations. “He hauled climate change out of a ditch.”

Richard Gowan, a U.N. expert at the European Council on Foreign Relations, agreed.

Ban “had very little to show for himself at the end of the first term,” Gowan said. “He would probably have been written off as a C-grade secretary-general. Because of climate change, he will be remembered as a B-grade secretary-general. I think historians will quibble over whether his role was decisive. I don’t think you could say no deal without Ban, but he did put his shoulder to the wheel.”

His climate achievements are at risk under the incoming U.S. administration. In his campaign, Trump dismissed global warming as a “hoax” perpetrated by the Chinese to hinder U.S. industry. And he has threatened to withdraw from the Paris pact.

Ban said he pressed Trump during a phone conversation, three days after the Nov. 8 election, to reconsider his position on climate change. Ban said Trump was mostly in a listening mode, but that he assured him he was keeping an “open mind.”

“I’m hopeful that as a successful global business leader, he will understand that business communities are already changing and retooling their way of doing business” to limit global warming, Ban said.