Barack Obama could have been appearing on a pop-star’s stage. Yet the message he delivered in the annual Nelson Mandela lecture was far more somber than the setting.

The elite class whose rise has been fueled by their outsized share of global riches, he said in very direct terms, needs to take care of those left behind.

“For all the magnificence of the global economy, all the shining skyscrapers that have transformed the landscape around the world, entire communities, entire neighborhoods, entire cities, entire regions have been bypassed,” Obama declared. “For far too many people, the more things have changed, the more things stay the same.”

A crowd of 15,000 had given the former US president a standing ovation as he walked on, and again when he took to the podium. Some even chanted his 2008 campaign slogan, “Yes we can!”

Previous speakers at for the Mandela lecture have included high-profile names like Bill Clinton, Mo Ibrahim and Bill Gates, yet it was the first time that the lecture was held in a stadium. Visitors to the Wanderers cricket stadium in Johannesburg’s northern suburbs dressed up for the occasion. To reward them for braving the South African winter, the Nelson Mandela foundation handed out blankets in the open-air venue.

On the centenary of Mandela’s birth, Obama recalled how inspired he was by his story, that of a little black boy born at a time when black culture was brutally circumscribed and a people’s aspirations were limited by oppressive laws and customs. That boy, Obama said, inspired people around the world—including one American college student who shifted his priorities in the late 1970s. When Mandela walked free in 1990, just months after the fall of the Berlin Wall, a young Obama believed the world had finally changed for the better.

“It seemed as if the forces of progress were on the march, that they were measurable with each step he took” Obama said. “You felt, this is the moment when the old structures of violence and repression, ancient hatreds, that had so much effect on people’s lives and the human spirit, that all that was crumbling before our eyes.”

His face took on a graver tone. That international order that had dismantled the wall and brought apartheid down had “fallen short of its promise,” he said. The globalization, which opened economies like China to the world and gave far smaller countries hope, also had deepened inequality within nations—and between them.

For all the growth driven by technology and globalization, Obama said, a backlash manifested itself in the 9/11 attacks, the instability caused by the “ill-advised” invasion of Iraq, Russia’s determination to reassert its authority, the reckless behavior of the financial elite that led to the Great Financial Crisis, and the growing intolerance of both the far right and the far left.

In all of this a new international elite has grown, one that is equally comfortable in New York and Nairobi. This, Obama said, is a cosmopolitan group unburdened by political ideology and are often philanthropic. They may idolize Mandela, but on their watch inequality has deepened.

“There’s only so much you can eat, there’s only so big a house you can get,” he told a roaring crowd in the wealthy suburbs of South Africa’s economic hub, a center of one of the world’s most unequal societies. Going off script, he said how strange he still found life within the global elite that he was now part of.

Obama was clear that he believes the solution was more inclusive capitalism—the kind doesn’t impoverish you when you give back. He spoke of an inclusive, market-based system, which protects collective bargaining, breaks up monopolies, enforces laws that root out corruption. This ideal world would be characterized by progressive taxation that contributed to public health and a social net.

He also supported the idea of universal basic income, a controversial economic policy idea that has gathered support in recent years to give all residents of a country an unconditional cash payment instead of tax benefits, grants, or other social-service program support.

“It’s not just money that a job provides,” Obama said. “It provides dignity and structure and a sense of place and a sense of purpose. So we’re gonna have to consider new ways of thinking about these problems, like a universal income.”

Economics, he said must work to protect democracy. In a world where objective facts and a common view of humanity are in dispute, Obama said, those who share his beliefs was going to have to work harder and smarter.