Kenya's President Uhuru Kenyatta has said that his government will use the full force of the law against people using social media to express support for the deadly terrorist attack at a Nairobi mall.

Kenyatta said that anyone found spreading hate messages on social media will be prosecuted under laws similar to those that will apply to the terrorists responsible for the attack.

The warning came after the Twitter account of Somalia's Islamist militant group al-Shabaab was suspended but swiftly replaced by a new one.

The terrorist group linked to al-Qaida used the account @HSM_Press to claim responsibility for the attack on the upmarket Westgate mall that has left at least 59 people dead and 175 wounded.

"The Mujahideen entered #Westgate Mall today at around noon and are still inside the mall, fighting the #Kenyan Kuffar (infidels) inside their own turf," al-Shabaab tweeted.

Twitter regulations state that users can be blocked "for any unlawful purposes or in furtherance of illegal activities" and so the account was taken down.

However, a new English-language account (@HSM_PRESS2) has since started to tweet updates on the attack and hailing as heroes the 20 or so Islamic insurgents who broke into the four-storey mall and are still holding hostages.

"We got suspended few minutes ago and we are back tweeting live from #Westgate," the group tweeted.

"No matter how many suspends we are going to tweet every single operation and the good news is that we have more operation to carry out," it continued.

Al-Shabaab's Arabic language account @HSMPress_arabic and a second English language account @HSM_PressOffice are still online.

Al-Shabaab said it launched the attack in retaliation against Kenya's military involvement in Somalia, which is aimed at freeing the country from the grip of the terrorist group.

@HSMPress had already been suspended twice this year, after the group posted photographs of a French commando it killed and threatened Somalia's President Hassan Sheikh Mohamud.