NAIROBI, Kenya — Apparently there is no brotherly love among East Africa’s Islamist militants.

This past week, a new militant group called Jahba East Africa, or the East African Front, which has pledged allegiance to the Islamic State, publicly insulted the Shabab, the top militants in the region.

“Al Shabab has now become a psychological and physical prison,” the East African Front said. It went on, in a letter written in English and published on Twitter, to complain that the Shabab was wrongly purging Kenyans, Tanzanians and Ugandans.

“Sadly,” the letter said, “Al Shabab has forgotten the resolved need to work for the establishment of the rule of Allah.”

The Shabab, who have terrorized Somalia for years, have not offered a response directly. Emails sent to the group’s press office went unanswered.

But two days ago, the Shabab released a triumphant — and graphic — video showing their prowess on the battlefield. The video features slickly produced footage of the militants overrunning a Kenyan military base in Somalia, where scores of Kenyan soldiers were killed.

“The Shabab are really good at countermessaging,” said Matt Bryden, chairman of Sahan Research, a research organization that specializes in the Horn of Africa. “They’ll take a message that they’re weak and on their last legs, and use countermessaging to undermine the credibility of their adversaries.”

Some of the scenes are gruesome: Shabab fighters are seen firing at the heads of fallen soldiers at close range.

The battle took place in January. But the Kenyan government has yet to release casualty figures. According to Western diplomats, at least 160 Kenyan soldiers were killed and 20 were captured, the single worst military defeat in Kenya’s history. The Kenyan military maintains several bases throughout Somalia as part of a regional peacekeeping mission.

Several military analysts said the Shabab video showed how poorly prepared the Kenyans were at that base.

Kenyans on social media have deplored the video as propaganda and urged people not to watch it or share it.

Little is known about the East African Front, which said it recognized Abu Bakr al-Baghdadi, the leader of the Islamic State, as the rightful leader of all Muslims. Mr. Bryden of Sahan Research said it was not clear how many fighters, if any, the East African Front has. The organization’s Twitter account shows masked men riding all-terrain vehicles rigged with enormous guns.

Many analysts have said that the Islamic State is steadily making gains across Somalia, increasing the likelihood of fighting between rebel groups, as has happened in Syria.

Follow Jeffrey Gettleman on Twitter @gettleman.

A version of this article appears in print on , Section A, Page 5 of the New York edition with the headline: East African Militant Groups Compete Online for Notoriety. Order Reprints | Today’s Paper | Subscribe