Video by NYC Mayor’s Office

NEW YORK — Hillary Clinton and New York City Mayor Bill de Blasio have come under fire over a comedy skit that some people feel was racially insensitive.

Clinton, just days before the crucial New York primary, was a surprise guest during the mayor’s performance at the annual Inner Circle show in Manhattan on Saturday night, a black-tie charity gala that is the city’s answer to the White House Correspondents Dinner.

Clinton, the Democratic presidential front-runner, took the stage and, in a scripted scene, teased de Blasio, a fellow Democrat who managed her 2000 Senate campaign, for taking so long to endorse her presidential bid.

“Sorry Hillary,” de Blasio replied, “I was running on ‘CP time.'”

At first, that seemed to be a reference to a racial stereotype, “colored people time.” Leslie Odom Jr., a black actor who plays Aaron Burr in the Broadway smash “Hamilton” was also on the stage and pretended to be offended.

“I don’t like jokes like that, Bill,” Odom said.

But then Clinton interjected: “‘Cautious politician time,'” she said. “I’ve been there.”

Many in the room where it happened, which was filled with New York politicians, power brokers and reporters, laughed at the joke. But it soon made its way around social media and drew some scornful media coverage.

The New York Daily News blared “Skit for Brains” on its Tuesday front page. Salon called the skit “cringe worthy.” And New York magazine made reference to the mayor’s African-American spouse asking, “Does your wife, Chirlane, know about this joke?”

De Blasio, whose two multiracial children identify as black, downplayed the controversy.

“It was clearly a staged event,” he told CNN on Monday. “I think people are missing the point here.” Mayoral aides added that the skit was not meant to offend and pointed out that it was far from the only risque joke during a night in which reporters put on a show to roast politicians and then the mayor returns the favor.

A spokesman for Clinton echoed the point, saying the campaign “agreed with the mayor.”

At the White House, spokesman Josh Earnest deflected questions about the propriety of the joke, saying he hadn’t seen it and therefore was “very reluctant to wade into this very far.” But he praised both Clinton and de Blasio.

“So I can’t speak to any misguided attempts at humor. I can only speak to their commitment that they’ve shown over the course of their career to justice and civil rights,” Earnest said.

The flap comes at a poor time for Clinton, who has enjoyed deep support from black voters during the previous primaries and is banking on their support again in New York’s April 19 primary to ward off a challenge from Bernie Sanders. A loss for Clinton in her home state could upend the Democratic race, though she would still have a significant delegate lead.

SUBSCRIBE: Get the analysis of Mark Shields and David Brooks delivered to your inbox every week.