(CNN) -- CBS' newest "How I Met Your Mother" episode was supposed to serve as the latest and greatest installment in the series' ongoing gag about soundly, if humorously, slapping around a good friend.
Only thing is, some in the Asian community saw it as a slap in the face.
The sitcom's Monday show generated buzz on social media, but not for the reasons its creators intended. Instead, some reacted angrily to the decision to recast lead character actors -- all of them white -- in yellowface and to dress them in stereotypical Asian attire.
"Yellowface? Orientalism? Fu Manchu? What?" tweeted one person, referencing the term "oriental" that many Asians find offensive. "Not okay @cbs."
On Wednesday, the creators of "How I Met Your Mother," which is in its final season, acknowledged the controversy and that some people had been offended by the portrayals in the show. Carter Bays tweeted that the episode aimed to be a "silly and unabashedly immature homage to Kung Fu movies." But Bays added that some didn't see it as funny at all, and for that, "We're deeply sorry."
"We try to make a show that's universal, that anyone can watch and enjoy," Bays said, in remarks seconded by the show's co-creator, Craig Thomas. "We fell short of that this week, and feel terrible about it."
The episode was titled "Slapsgiving 3: Slappointment in Slapmarra," continuing a tradition on the series about solitary, powerful, ritual slaps among friends.
This one starts with the main characters sitting in their favorite bar, with Marshall Eriksen (played by Jason Segel) explaining how he had sought out "special training" to deliver Barney Stinson (played by Neil Patrick Harris) an especially epic slap.
A kung fu master spurned his first attempt at instruction, explaining, "Kung fu is an ancient and honorable martial art. It must be learned with great devotion and respect." Then a young boy in the studio comes out of nowhere and tells Marshall how he can master "the slap of a million exploding suns."
Despite Barney's disbelief, Marshall explains his yearlong journey to Shanghai and Cleveland getting schooled by three masters who teach him speed, strength and accuracy.
Each of these masters are played not by Asian actors, but other actors on the series adorned in Asian garb, yellowface and, in one case, a Fu Manchu mustache.
The episode climaxes 17 hours before the wedding of Barney, who receives a mighty slap that literally leaves him red in the face. Out of nowhere, the group Boyz II Men then comes out and signs about the "so awesome" slap.
Some viewers reacted angrily to the episode the next day, including several who used the #HowIMetYourRacism hashtag.
There were a number of people who rallied to the show's defense, saying people were overreacting. But others didn't think anything about the ordeal was funny, with some jabbing the program for its lack of minorities and playing up Asian stereotypes.
"Incredibly easy for white people to say 'that wasn't racist,'" one person tweeted. "Not so easy for PoC" -- shorthand for people of color -- "to be marginalized their entire life."