Suspected militants have attacked a luxury hotel complex in Nairobi, killing at least 15 people.

The compound in the Westlands district of the Kenyan capital, which houses the DusitD2 hotel as well as offices, was attacked by gunmen on Tuesday.

By the evening officials said the siege was over but gunfire and explosions were heard early on Wednesday and a security operation is ongoing.

The Somalia-based militant group al-Shabab said it was behind the attack.

Police sources say 15 people have been killed, but an official number has not yet been confirmed by the government.

Some civilians are reportedly still trapped in the complex, and some have been texting relatives from hiding places.