In his final address to the U.N. General Assembly, the normally taciturn U.N. Secretary-General Ban Ki-moon said that he felt “deep concern” as he prepares to leave office before launching into a litany of world leaders’ recent failures:

Gulfs of mistrust divide citizens from their leaders. Extremists push people into camps of “us” and “them.” The Earth assails us with rising seas, record heat and extreme storms. And danger defines the days of many.

Ban stated that recent achievements in economic development and public health are vulnerable to “grave security threats”:

Armed conflicts have grown more protracted and complex. Governance failures have pushed societies past the brink. Radicalization has threatened social cohesion—precisely the response that violent extremists seek and welcome.

This is not where he then pivoted with a but! to things more hopeful. Instead, Ban went on to detail the consequences of these trends in Yemen, Libya, Iraq, Afghanistan, the Sahel region, Ukraine, South Sudan, and North Korea. Still, he saved most of his frustration for Syria, pointing to this week’s bombing of a U.N. aid convoy and saying “just when we think it cannot get any worse, the bar of depravity sinks lower.”

He noted:

Present in this hall today are representatives of governments that have ignored facilitated, funded, participated in or even planned and carried out atrocities inflicted by all sides of the Syria conflict against Syrian civilians.

He also shouted out both Israeli and Palestinian leaders, calling the current state of affairs “madness” and arguing that abandoning the two-state solution “would spell doom” for both peoples.

Perhaps with a certain American candidate in mind, Ban warned “political leaders and candidates” against demonizing Muslim refugees. “Do not engage in the cynical and dangerous political math that says you add votes by dividing people and multiplying fear,” he said.

This is pretty strong stuff from Ban, whose style has generally be nonconfrontational, sometimes to a fault. The South Korean diplomat will step down at the end of this year, and an election for his replacement is currently ongoing. While he will have some notable achievements to point to during his tenure—some of which he touched on in the second half of his speech, including the Paris Agreement on climate change and the adoption of new “Sustainable Development Goals”—he may be better remembered for having presided over the U.N. during some dismal scandals. There was the introduction of a devastating cholera epidemic to Haiti by U.N. peacekeepers, and a yearslong failure to address evidence of sexual abuse by peacekeepers in several conflict areas. Ban will also likely be remembered for the U.N.’s failure to meet the (admittedly unprecedented) challenge of a record population of refugees and displaced people.

The speech also touched on a less specific and a completely unprovable sense that in the closing years of his tenure, the mostly peaceful and prosperous world order in place since the end of the Cold War has started to unravel, threatening a return to the kind of violence and geopolitical rivalries more common in the last century.

On Tuesday, Ban sounded like a man very frustrated at the leaders he’s had to work with, and even more so about the legacy he’s leaving.