President Barack Obama speaks during the opening ceremony of the Smithsonian National Museum of African American History and Culture on the National Mall in Washington on Sept. 24, 2016. (Manuel Balce Ceneta/AP)

While watching the presidential debates Monday night, I was struck by the ease with which the two white candidates talked about race.

Both Hillary Clinton, the Democratic presidential nominee, and Donald Trump, the Republican nominee, jumped head-first into the murky waters of race. It didn’t matter whether you agreed with them. They were firm in their beliefs about the plight of African Americans and convinced about what needed to be done about it.

And in doing so, they did something the nation’s first black president has struggled to do for much of his eight years in office — talk without constraint about race.

“It’s just a fact that if you’re a young African American man and you do the same thing as a young white man, you are more likely to be arrested, charged, convicted, and incarcerated,” Clinton said during the debates. “So we’ve got to address the systemic racism in our criminal justice system.”

Obama hadn’t come close to making such a statement until very recently. In fact, he talked less about race in his first two years in office than any other Democratic president since John F. Kennedy, according to a study by Daniel Gillion, a political scientist at the University of Pennsylvania.

Hillary Clinton and Donald Trump meet for their first presidential debate at Hofstra University in Hempstead, N.Y., on Sept. 26, 2016. (Melina Mara/The Washington Post)

Obama’s reluctance to pointedly broach the subject was no doubt part of his appeal. Obama would usher in a post-racial America as a president who happened to be black, not as a black president.

As controversies began to arise about how police interacted with black people, Obama made some tepid attempts to weigh in. He held a “beer summit” with a police officer and Henry Louis Gates in the Rose Garden. And he famously said after the shooting of Trayvon Martin that Martin could have been his son.

The blowback from white Republicans was fierce but should not have been unexpected. Obama seemed stunned, however, and hardly addressed the subject again during his first term.

The contrast between Obama’s avoidance of racial controversy during his presidential campaigns and the current contenders’ embrace of it has been stark.

Clinton, who was harshly criticized for referring in 1996 to black kids as “super predators,” apologized and got back into the fray.

“I think implicit bias is a problem for everyone, not just police,” she said. “I think, unfortunately, too many of us in our great country jump to conclusions about each other. And therefore. I think we need all of us to be asking hard questions about, you know, why am I feeling this way?”

A news analysis of Clinton’s remarks appeared in the Washington Times under a headline that read: “Hillary Clinton calls the entire nation racist.” She does not have the same burden about whether her views were mischaracterized as the president might.

Trump has described black and brown communities as hell.

“We have a situation where we have our inner cities, African Americans, Hispanics are living in hell because it’s so dangerous,” Trump said during the debate. “You walk down the street, you get shot. We have to protect our inner cities, because African American communities are being decimated by crime, decimated.”

There’s been some criticism, but compare it with the blowback Obama received when he described white voters in small, job-depressed towns as clinging to their guns and religion. So Obama went back to broaching the subject of race in muted tones with words aimed at soothing white fears and quelling black anger.

Clinton and Trump are under no such constraints. As has been demonstrated throughout the campaign and especially during the debate, white candidates can wrangle over race and decide what to do about black people with near impunity. It’s a kind of privilege that the nation’s first black president could never enjoy.

Trump, when asked on the campaign trail about a white police officer shooting an unarmed black man in Tulsa, appeared to side with the black man. “To me, it looked like someone who was doing what they were asking him to do,” Trump said. “This young officer, I don’t know what she was thinking. I am very, very troubled by that.”

Obama would have had to preface such a comment with glowing praise for the police, better to avoid the perception that black lives matter more than blue ones.

It is just now in his final years in office that he has spoken more forcefully about race. At the dedication of the National Museum of African American Museum of History and Culture, he pointed out that black people were “not a burden on America or a stain on America, or an object of pity or charity for America. We’re America.”

He was speaking to the nation, but this time the words were meant to soothe black America.

To read previous columns, go to washingtonpost.com/milloy.