Ahead of the Academy Awards this year, Chris Rock had a problem.
The African American comic and actor, a prominent critic of race in Hollywood, was contracted to host the telecast of the 88th Oscars for the second time. But he found himself at the centre of a storm of controversy after the Academy announced an all-white slate of acting nominees, for the second year in a row.
Social media cried foul over the perceived snub to several prominent black artists and their films, Spike Lee and Will and Jada Pinkett Smith skipped the ceremony in protest, and civil rights leaders called for a public boycott.
Rock said he considered quitting, too, "but I realized they were going to hold the Oscars anyway," he said. So his solution was instead to use the broadcast - all 3.5 hours of it - to shine a light on Hollywood's diversity problem.
He opened Sunday's show - "the white people's choice awards," as he called it - with a question.
"Why are we protesting? Why this Oscars?" Rock asked, pointing out that there have been no black nominees "at least 71 other times," in past decades.
"Why? Because we had real things to protest" back then, he said. "We were too busy being raped and lynched to care about who won best cinematographer."
Despite the absence of black nominees, Hollywood's annual awards gala could not be accused of ignoring race this year.
From Rock's acerbic opening monologue and pointed taped segments challenging black marginalization in cinema to his final salute that "black lives matter," race was as much the focus of the broadcast as the films it exists to celebrate.
"Is Hollywood racist? You're damn right Hollywood is racist," Rock said.
Not "burning-crosses racist," not "fetch-me-some-lemonade racist," but "'sorority racist,'" Rock joked. "'We like you, Rhonda, but you're not a Kappa.'"
"We want opportunities. We want the black actors to get the same opportunities, that's it," he added.
Academy of Motion Picture Arts and Sciences President Cheryl Boone Isaacs took the stage as well, calling on Hollywood to act to create an inclusive industry.
"Our audiences are global and rich in diversity, and every facet of our industry should be as well," she said.
The public outcry over the nominations in January moved the Academy to overhaul its voting and membership rules, and pledge to double women and non-white membership by 2020.
But rather than quelling the debate, it expanded it to include diversity and clout in the industry as a whole. Accustomed to framing society's stories, Hollywood has itself now become a reluctant parable for the country's entrenched struggles with race.
With tongue in cheek, Rock promised to use the ceremony to shine a light. "Things are going to be a little different" this year, he promised, starting with a segment traditionally devoted to film artists who died in the past year.
"This year the in memoriam package is just going to be black people that was shot by the cops on their way to the movies," Rock said.
It was not, but much of the rest of the ceremony focused on tensions over diversity.
A taped segment about creating opportunities for black actors satirized the year's top films, and the system that made them.
Oscar winner Whoopi Goldberg played a cynical janitor alongside Jennifer Lawrence's mop entrepreneur in Joy. African American comic Leslie Jones reprised The Revenant's famous bear attack scene - as the bear - telling Leonardo DiCaprio he should have called her back for a role.
And Rock appeared in Matt Damon's space suit as the stranded astronaut in The Martian, only to have white NASA officials tell him they won't spend their "white dollars" to bring him home.
A mock tribute to Black History Month - February in the United States - set up what was clearly a tribute to Will Smith, an African American actor passed over for a nomination this year. The joke's punchline? At the end, the tribute celebrated a white actor, Jack Black.
Rock also reprised a segment from his 2005 Oscars show, in which he interviewed black movie-goers in a historically black neighbourhood about the year's nominees.
Few had heard of the year's white Oscar nominees, but they all knew the African American themed films that didn't make the cut.
But the skit turned poignant, when Rock gave interviewees an Oscar statuette to hold, and asked for their acceptance speeches.
"This should not just be white - it should be Asian, Hispanic, there's talent out there of all races," said one man.
A woman said African Americans should get more Oscars because "they deserve it and work hard for it just like anybody else."
"How about that, America?" she said.