The Twitter account of al-Shabaab, Somalia's al-Qaida-linked terror group, has been closed for the second time this year.

The closure comes only days after al-Shabaab claimed responsibility for a failed assassination attempt against Somalia's president and tweeted that next time he would not be so lucky. It also comes within 24 hours of a US-based terrorism expert's report that Twitter's terms of service have been violated.

Al-Shabaab uses Twitter mainly to make claims of enemy kills and to spread its view on events in Somalia and east Africa. A United Nations report on Somalia released last month said UN experts believed the person running the English-language account was a British member of al-Shabaab.

Twitter suspended al-Shabaab's previous account in January two days after the group used the platform to issue a death threat against Kenyan hostages. Twitter's terms of service forbid specific threats of violence against others.

The extremists' use of Twitter has upsides and downsides, say terrorism analysts. While tweets can be used by analysts and governments to gather intelligence, militants use the accounts to spread propaganda and recruit fighters.

The account closure is likely to keep al-Shabaab off Twitter only temporarily.

JM Berger, the US-based terrorism analyst, said on Friday: "I'm sure al-Shabaab will be back on Twitter, but maybe next time they will know they have to behave like civilised people to stay."

Berger argues there is little valuable intelligence that can be gleaned from these accounts and that closing the accounts in fact strengthens intelligence gathering because experts can track who quickly follows the new Twitter account – often people with a connection to or interest in al-Shabaab or terrorism.