President Obama gave a strikingly important speech on Sunday, one in which he seemed to apply the lessons of America's struggle with racism and discrimination toward US foreign policy. And the world barely noticed.

To me, this is the most radical and thus perhaps most important foreign policy speech of the Obama presidency — even more so than his much-discussed 2009 Cairo speech.

While Obama’s address in Kenya was ostensibly about that country's path to prosperity and the barriers it must overcome to achieve its full potential, it actually offered something much more powerful. In the 43-minute speech, Obama discussed something that we don't typically consider a foreign policy issue: the legacy of past discrimination, and the burdens that legacy can impose on a society, its politics, and its economy. It sounded, at moments, like a speech about America.

While his remarks focused on Kenya, they might as well have been about the United States. And this is what was so striking about the speech: the degree to which Obama seemed to articulate a worldview, and thus a foreign policy, rooted in the lessons of America’s history of racial discrimination. Obama was offering not just a prescription for one African country, but a diagnosis of how discrimination and hatred can endanger any society — one he seems to have drawn from his experiences engaging with America's domestic struggles during his presidency.

This is a much broader and more comprehensive worldview than the one with which Obama came into office: a vaguely defined plan for solving problems with "dignity promotion." It was a narrow and unambitious way to see the world's problems, and, sure enough, Obama's foreign policy has floundered time and again when faced with challenges that come from other countries' internal issues. Obama seemed reluctant to acknowledge the degree to which other countries' histories and institutions are often part of the problem that must be addressed, and so those problems grew.

Tellingly, the shift in foreign policy Obama seemed to signal in his Kenya speech mirrors his evolution on domestic matters. For much of his presidency, he took an individualist approach to discrimination, urging black Americans to embrace ambition and responsibility in order to overcome racism, and focusing on interpersonal connection — remember the "beer summit"? — as a way to overcome prejudice.

But recently Obama has adopted a more structural view of both discrimination and the harm it can cause. Racism, he said during a podcast interview with Marc Maron in January, is in this country's DNA. Its legacy is embedded in "almost every institution of our lives." Ending discrimination is a matter of coming to terms with history, and it is a job for every member of society, not merely those who need to overcome their own prejudice.

The Kenya speech suggests that Obama has developed a vision for how those lessons from the US could apply to foreign policy. These are important ideas — if they can make it into practice.

How "bad traditions," from the Confederate flag in the United States to child marriage in Kenya, hold back societies

Kenya, Obama said in his speech, is facing "a moment filled with peril, but also enormous promise." Much of the speech was framed as advice for Kenyans about how they could seize that moment and capitalize on that progress.

As American presidents typically say in such speeches, Obama touched on the need to strengthen democratic institutions. But his comments mostly focused on something else: the importance of ending all forms of discrimination, whether against women and girls or against ethnic and religious communities.

He reminded the audience that Martin Luther King Jr.'s famous dream was not just of an America without segregation, but of a world in which people would be judged by the content of their character, without prejudice or bigotry. "In the same way, people should not be judged by their last name, or their religious faith, but by their content of their character and how they behave. Are they good citizens? Are they good people?"

What was most striking was the way he described discrimination: as a societal problem, a structural issue with its roots in history and tradition. These problems, he said, had the potential to destroy entire societies' progress and safety.

"These are issues of right and wrong," he said, "in any culture. But they’re also issues of success and failure. Any nation that fails to educate its girls or employ its women and allow them to maximize their potential is doomed to fall behind in a global economy."

The implications of that are really important, because they shift the burden of responsibility from prejudiced individuals to society as a whole. Traditions, after all, are shared. No one person can overcome them alone.

Kenya's struggle to overcome practices that harm women and girls, such as female genital mutilation and forced marriage, Obama pointed out, share some things in common with America's debates over the Confederate flag and the legacy of slavery:

Look at us in the United States. Recently, we've been having a debate about the Confederate flag. Some of you may be familiar with this. This was a symbol for those states who fought against the Union to preserve slavery. Now, as a historical artifact, it's important. But some have argued that it's just a symbol of heritage that should fly in public spaces. The fact is it was a flag that flew over an army that fought to maintain a system of slavery and racial subjugation. So we should understand our history, but we should also recognize that it sends a bad message to those who were liberated from slavery and oppression.

By grounding his points in a discussion of America’s struggle to overcome its legacy of white supremacy, Obama didn't just avoid the trope of a Westerner lecturing Africans about how to be more Western. He illustrated the universality of these problems, how they can and do hold back any society.

"Every country and every culture has traditions that are unique and help make that country what it is," he said, but "just because something is a part of your past doesn’t make it right. It doesn’t mean that it defines your future."

The president returned to that theme a few minutes later, this time with a broader scope, and on a very sensitive issue. In 2007 in Kenya, ethnic violence broke out after a disputed presidential election.

"From a distance, it seemed like the Kenya that I knew, a Kenya that was able to reach beyond ethnic and tribal lines, might split apart across those lines of tribe and ethnicity," he said. "But look what happened. The people of Kenya chose not to be defined by the hatreds of the past. You chose a better history."

Discrimination isn't just wrong, he said, but endangers society as a whole: "When we start making distinctions solely based on status and not what people do, then we're taking the wrong path and we inevitably suffer in the end."

What was really significant about this was not the obvious point that discrimination is bad, but that failing to treat people equally creates serious practical problems — even security threats.

Obama seemed, if gently and implicitly, to refer to Kenya's poor treatment of Somalis — including, in 2014, turning the very stadium in which he was speaking into a makeshift prison for nearly 1,000 Somalis who were rounded up in apparent retaliation for an al-Shabaab bomb that had killed six people. The proper way to deal with terrorism, he said, was not to persecute people who share the terrorists' religious or ethnic background, but rather to welcome people of those backgrounds into society:

Extremists who prey on distrust must be defeated by communities who stand together and stand for something different. And the most important example here is, is that the United States and Kenya both have Muslim minorities, but those minorities make enormous contributions to our countries. These are our brothers, they are our sisters. And so in both our countries, we have to reject calls that allow us to be divided.

This is where it starts to become clearer that Obama wasn't just talking about Kenya or how the hard lessons America has learned apply there. Rather, he was talking about how those lessons — about racism, about Islamophobia, about discrimination against women and girls — apply universally, to the US and to Kenya and indeed to all countries.

Another word for a universally applied lesson is a worldview, and at moments that seemed to be precisely what Obama was describing. Here, in one striking example, is how he elaborated on the issue of terrorism and how systemic discrimination plays into it:

Violent extremists want us to turn against one another. That's what terrorists typically try to exploit. They know that they are a small minority; they know that they can't win conventionally. So what they try to do is target societies where they can exploit divisions. That's what happens in Iraq. That's what happens around the world. That's what happened in Northern Ireland.

You can also see this worldview peek through in how Obama spoke about the burdens and costs of discrimination against women and girls. He described this in a way that was applicable not just to Kenya but generally, denouncing such practices as "bad traditions."

Well, so around the world, there is a tradition of repressing women and treating them differently, and not giving them the same opportunities, and husbands beating their wives, and children not being sent to school. Those are traditions. Treating women and girls as second-class citizens, those are bad traditions. They need to change. They’re holding you back.

He was recognizing, with the word "traditions," that these behaviors are more deeply embedded than just the practices of certain individuals, and that they are acts for which entire societies are responsible. He framed these problems as something that doesn't just impact affected individuals, but that are a burden on the entire society in which they occur: "They're holding you back." They incur economic costs.

It's a worldview that sees discrimination as driven by societies rather than individuals, and thus as something that is a problem for all of that society. Solving such problems, then, is a task for all of society — the same way that Obama sees tackling American racism as something America has to do collectively and holistically — but any effective solution will benefit everyone too.

It's not the sort of way you expect an American president, whether Obama or any of his predecessors, to talk about social ills and their solutions. Perhaps because the speech was given far away during a busy news week, and seemed on the surface to focus on the Kenyan audience, it has not gotten much attention. But make no mistake: The way Obama is describing his worldview is dramatically and meaningfully different from anything we've heard from a president before.

How Obama changed his approach to racism — and how that could change his foreign policy

This speech captures two big, important shifts. The first is in the way we think about discrimination, and the second is in the way we think about why it matters. Both of these have their roots not in foreign policy discourse, but in America's struggles with the legacy of discrimination at home.

In recent years, there has been a slow but powerful sea change in how we talk about discrimination in the US, away from viewing it as caused by individual hatred and prejudice and toward understanding it as the legacy of history; of structures, traditions, and laws that continue the work of discrimination even if none of the individuals within them are intentionally directing them to that purpose.

America's ongoing debate about police brutality, for example, is not just about whether individual officers are or are not racist. It is also about how policing can have a discriminatory effect because of policies that target "high-crime areas" that are more likely to be predominantly black. And it's about how decades of discriminatory housing regulations helped make those neighborhoods predominantly black in the first place.

This has been an enormously meaningful and important change in how we think about American problems with race and discrimination. You can see it in how Obama himself has shifted his approach. For years, he spoke about discrimination only rarely, often focusing not on systemic racism but on the actions of individuals. More recently, he has come to talk about structural racism as something that is baked into this country's DNA and embedded in its institutions.

In this view, ending racism means confronting that history, which is a job for every person in this country. But it also means that rooting out the legacy of racism is a project that will have benefits for the country as a whole. It's not special treatment for minorities, it is a way to achieve a more perfect union.

What Obama now seems to be doing is applying that same evolution in thinking — an evolution that has occurred in much of mainstream American thought as well as for Obama personally — to foreign policy. That is an even newer and more radical idea.

VIDEO: President Obama explains his foreign policy philosophy

How this could change US foreign policy — if it's actually put into action

The person who could most stand to learn the lessons in Obama's speech is, well, Obama himself. His foreign policy has frequently struggled or outright failed, particularly in the turmoil-wracked Middle East, in part because he has avoided exactly the lessons he described in Kenya.

It has often seemed like part of Obama's problem in foreign policy was an inability to grapple with the same kinds of structural problems that he discussed in the Kenya speech: institutions and practices that leave societies weak and divided, and which can then be exploited, including by violent extremists.

Obama failed to anticipate how badly Libya would splinter after the US-led intervention, for instance, or the implications of Yemen's recent collapse. Likewise, his administration is struggling to deal with the sudden rise of sectarian conflict across the Middle East. Often, these conflicts are driven to a real degree by the same forces of institutionalized discrimination he described in his speech — sectarian politics in Syria, tribal politics in Libya.

It is a shame that Obama did not seem, in practice, to really engage in those deeper problems in the way he has urged Americans to do with regards to racism, and urged Kenyans to do in his speech. One notable exception is Iraq, where he did finally withdrew US support from the violently sectarian Iraqi Prime Minister Nouri al-Maliki, who badly worsened the sectarian divisions that allowed ISIS to rise, and instead shifted US support toward a more inclusive Iraqi government. He executed on the ideas he described in his speech.

The Iraq case is notable mostly because Obama waited until after ISIS had conquered much of the country to enact this vision; that is to say, because he waited so long, it largely failed. But this goes to show how much more effective US foreign policy can be when it (ever so rarely) takes these ideas into account: Since Baghdad's government became more inclusive, it has helped to stem ISIS's rise in Iraq. It also suggests that maybe, just maybe, Obama is coming around to actually putting these ideas into practice.

It is too early to know if the Kenya speech actually marks a shift in Obama's view of those problems, or if that shift will find its expression in better policies. Sometimes a speech is just a speech. But it is heartening, and indeed important, to hear him describe these ideas.

Sometimes, though not always, speeches actually do matter. If Obama, or perhaps his successor, truly embraces the ideas he described in Kenya's Kasarani stadium, that will matter a great deal.