Cars are seen on fire at the scene of the attack. Photograph:( Reuters )
US officials said the attack had claimed the life of an American citizen.
The Al-Shabaab Islamist group in Somalia on Tuesday claimed responsibility for the attack in the Kenyan capital, according to the SITE Intelligence Group which monitors jihadist activities, newswire AFP reported.
The al-Qaida-linked group said it was behind the attack, which has seen a blast and gunfire at the DusitD2 hotel and office compound in the Nairobi suburb of westlands, according to a brief announcement via its news agency.
In 2010, the Shabaab had declared its allegiance to al-Qaida, to which it was officially integrated in 2012.
It is estimated to count between 5,000 and 9,000 men. Reports said at least 15 people were killed in the attack, however, it could not be independently confirmed.
Since the death in September 2014 of Ahmed Abdi Godane, killed in a US strike, their leader has been Ahmed Diriye.
Kenyan police chief Joseph Boinnet said "co-ordinated" operation included a suicide bombing in the foyer of the luxury hotel. The hotel consists of 101-room hotel, spa, restaurant, and offices for local and international companies.
"We can now confirm that this criminal activity commenced at about three o'clock [1200 GMT] in a coordinated fashion and began at I&M Bank with an explosion that targeted three vehicles in the parking lot, and a suicide explosion in the foyer of Dusit hotel," the police chief said in a statement.
Boinnet said security forces had contained six of the seven floors of the hotel and were also working to secure "remaining outbuildings in the complex".
"Our main is search and rescue as well as neutralisation of the criminal elements."
Gunfire was still ringing out sporadically beyond nightfall, almost six hours into the attack.
Meanwhile, US officials said the attack had claimed the life of an American citizen.
"We can confirm that a US citizen was killed in the attack. We offer our sincerest condolences to the family and friends of this individual," a State Department official said.
More than 12 hours after the assault began at Nairobi's upscale 14 Riverside Drive complex, bursts of gunfire and blasts were heard in the area, undermining government assurances everything was under control.
The shots rang out at around 3:30 a.m. local time (0030 GMT) as a group of around 150 workers was escorted from a building where they had sought refuge. Many more remained inside and some needed first aid for gunshot wounds, a first responder told Reuters.
By 1 am local time, 15 bodies had arrived at Chiromo Mortuary and more were expected, an attendant told Reuters.
Identification papers indicated that 11 were Kenyan, one was American and one was British, he said. The other two were not carrying documents.