LONDON — A BBC radio broadcaster was fired Thursday after posting a picture of a baby chimpanzee when tweeting about the birth of the Duke and Duchess of Sussex’s son, Archie Harrison.

Danny Baker, who until Thursday morning was a broadcaster for BBC’s Radio 5 Live, was accused of making fun of Meghan’s mixed-race heritage. He apologized following a backlash online and said he had meant to compare the royals to circus animals.

Baker tweeted the offending image shortly after Prince Harry and Meghan presented Baby Archie to the world in his first photocall.

Baker’s original tweet, since deleted, showed a black-and-white photo of a couple, with the woman holding hands with a young chimpanzee wearing a hat and a jacket.

The caption read: “Royal baby leaves hospital.”

The tweet prompted allegations of racism and calls for the BBC to fire him.

Charlene White, a news anchor for ITV News, tweeted: “To post a pic picturing a 3-day old baby of mixed heritage as a monkey, then claim it was a joke? That’s old-school prejudice and racism at its peak. And for a trusted broadcaster working at a public service broadcaster to feed that prejudice? It’s unacceptable.”

Afua Hirsch, author of “Brit(ish): On Race, Identity and Belonging,” criticized Baker for suggesting that there was something wrong with those who were offended.

“So not only does Danny Baker post an image comparing a baby w African heritage to an ape, but he has the audacity to say problem is that those of us who point out how racist it is have ‘diseased minds’. Classic example of blaming those of us who call out racism for its existence,” she tweeted.

Baker, who had presented a sports entertainment program on Saturday mornings, later told reporters outside of his house that he had parted ways with the BBC by “mutual agreement” — along with other comments that were bleeped out.

There is a long history of comparing black people to apes, which scholars have argued has helped to justify slavery and anti-black violence. In one high-profile incident, Michelle Obama was compared to an “Ape in heels” by a mayor of a West Virginia town, prompting a national uproar.

For her part, Meghan, who has an African American mother and white father, has been subjected to racism in Britain from the start of her relationship with Prince Harry. Shortly after the couple started dating, Harry took the highly unusual step of condemning the media coverage for its “racial undertones.”

Baker, the broadcaster, said that he was misinterpreted and apologized for the “unthinking gag.” He tweeted that it was “supposed to be joke about Royals vs circus animals in posh clothes but interpreted as about monkeys & race, so rightly deleted. Royal watching not my forte.”

He also said that it hadn’t occurred to him that he’d done anything wrong. “Sorry my gag pic of the little fella in the posh outfit has whipped some up. Never occurred to me because, well, mind not diseased,” he said.

On Thursday morning, he was fired.

In a series of tweets on Thursday, the 61-year-old presenter described being approached by journalists asking about the tweet.

“Now Sky at the door,” he said, referring to the broadcaster Sky News. “Would have used same stupid pic for any other Royal birth or Boris Johnson kid or even one of my own. It’s a funny image. (Though not of course in that context.) Enormous mistake, for sure. Grotesque. Anyway, here’s to ya Archie, Sorry mate.”

In an emailed statement, the BBC said: “This was a serious error of judgment and goes against the values we as a station aim to embody. Danny’s a brilliant broadcaster but will no longer be presenting a weekly show with us.”