Authorities sent special forces into the hotel to flush out the gunmen believed to be holed up inside.

Late on Tuesday night, about eight hours after the siege began, Interior Minister Fred Matian’i said that all of the buildings affected by the attack had been secured and that security forces were “mopping up”.

“I would like to reiterate that the situation is under control and the country is safe,” he said.

Civilians flee through a window at a hotel complex in Nairobi (Ben Curtis/AP)

He did not say give a toll of the dead and wounded. And it was not clear how many attackers took part in the siege.

However, an unnamed police officer said that bodies were seen in restaurants downstairs and in offices upstairs, but “there was no time to count the dead”.

Also, a witness who gave his name only as Ken said he saw five bodies at the hotel entrance.

He said that other people were shouting for help and “when we rushed back to try to rescue them, gunshots started coming from upstairs, and we had to duck because they were targeting us and we could see two guys shooting”.

The co-ordinated assault began with an explosion that targeted three vehicles outside a bank, and a suicide bombing in the hotel lobby that severely wounded a number of guests, said Kenya’s national police chief, Joseph Boinnet.

Survivors reported hearing a shattering blast and saw people mowed down by gunmen as they sat at a cafe. Victims were left lying on tables, bleeding.

“We were changing our shifts, and that is when I heard a loud blast and people were screaming,” said Enoch Kibet, who works as a cleaner at the cafe and managed to crawl out a basement gate.

“I couldn’t believe I was alive. The blast was so loud and shook the whole complex.”

Kenyan hospitals appealed for blood donations even as the number of wounded remained unclear.