Twitter has suspended an account used by Somalia's al-Qaida-linked militant group al-Shabaab after the insurgents used the site to post a hostage video and death threat.

The @HSMPress Twitter account was suspended two days after al-Shabaab used the platform to announce a death threat against Kenyan hostages unless Kenya's government met its demands. Twitter's terms of service say it does not allow specific threats of violence against others in its posts.

Terrorism analysts say analysts and governments can use tweets to gather intelligence, but the accounts can also be used by militants to spread propaganda or recruit fighters.

Al-Shabaab uses Twitter mainly to make claims of enemy kills and to spread its view of events in Somalia and east Africa. Terrorism analysts believe the account is run by someone who was educated in the west; al-Shabaab claims several dozen Americans and Britons among its ranks.

On 16 January, al-Shabaab posted a statement saying it planned to kill Denis Allex, a French hostage who was the subject of a botched rescue attempt by France's military. Later al-Shabaab used Twitter to announce Allex's death. French officials say they believe Allex died during the rescue attempt on 11-12 January.

"I'm in favour of allowing them to continue [using Twitter], but I don't think it should be unfettered," said JM Berger, a terrorism analyst who runs the website Intelwire.com. "They clearly crossed the line threatening to kill someone and that person ended up dead. It's in Twitter's interest not to allow that kind of thing."

Berger sent a public tweet to Twitter shortly after al-Shabaab posted its death threat against the Kenyans on Wednesday alerting Twitter to the terms of service violation. He said he suspected al-Shabaab was already back on Twitter, and he noted several accounts similar to the @HSMPress account.

Al-Shabaab joined Twitter in late 2011 after Kenyan forces moved into southern Somalia. Early tweets by al-Shabaab mocked a post by Kenya's army spokesman, Major Emmanuel Chirchir, that threatened to bomb concentrations of donkeys that might be moving weapons for the insurgents.

Several terrorism analysts, including Berger, have recently engaged another Twitter account – @abumamerican – in a running conversation.

The experts believe the account is run by Omar Hammami, an American from Alabama who joined al-Shabaab about six years ago. Hammami – whose nom de guerre is Abu Mansoor al-Amriki, or "the American" – has used Twitter and YouTube to publicise a falling-out with al-Shabaab.

Hammami announced through his Twitter account this month that al-Shabaab had threatened to kill him last Saturday if he did not turn himself in. He later said the death threat was revoked and that al-Shabaab was afraid of the media fallout of killing an American militant.

In an example of the surreal conversations Twitter allows experts to have with militants, a 22 January conversation with Hammami and several experts found Berger telling Hammami that American jihadis did not understand US politics. Hammami responded: "Pray tell." Berger then said he wasn't sure he should be giving Hammami advice. Hammami responded: "Hmm … ever consider switching sides? Ha!"

Berger acknowledged how strange the exchanges could be with a man who is on the US government's most wanted list of terrorists.

"I work from home so I tell people I sit around in my pyjamas and talk to terrorists," Berger said. "It's a strange world we live in."