A siege at Kenya's largest shopping mall in Nairobi launched by Islamic radicals in which dozens of shoppers were killed and more than 170 were injured, appears to be finally over.

With the crisis entering its fourth day, Kenyan officials have declared that all hostages being held at the Westgate shopping mall are free. They also claimed that the Kenyan military had taken back control the building from al-Shabaab militants.

"We believe all hostages have been released… situation of hostiles to be confirmed," a message on the Twitter account of the government's disaster operations centre said late on Monday.

There was confusion as a series of explosions continued to detonate at the five-storey mall in the early hours of this morning.

A source quoted by the Kenyan media said that the forces involved in the siege had left the building, and that the incidents were controlled explosions as the general services unit swept the complex for remaining explosives.

"A highly placed military source [said that the] hostage situation had been resolved," reported Kenya news channel KTN.

"[The operation] was spearheaded by Kenyan defence force which made inroads to the mall where captors were taking cover."

"All six suspected al-Shabaab militants [have been] killed. The authorities are now combing the mall floor by floor to make sure no explosive devices have been left."

On Tuesday morning, smoke continued to be visible from the mall, although there were conflicting accounts of the cause. The government said fires were started by the attackers as a diversionary tactic.

"We say the fire was put on by the terrorists to try and distract our activities," said one official. "But I also hasten to confirm that the fire will be put off shortly."

But Nairobi residents familiar with the mall said that the smoke appeared to be coming from the parking lot.

There were conflicting reports about the identity of the attackers, six of whom were reported to have been killed during the siege, and a number of whom were being held in custody.

"We have an idea who these people are, and they are clearly a multinational collection from all over the world," said Major General Julius Karanja, the chief of general staff for the Kenyan military. "We also have an idea that this is clearly not a local event."

The Somali al-Shabaab Islamist group has claimed responsibility for the attack, although its claim is still being investigated by Kenyan authorities. Kenya's foreign minister, Amina Mohamed, said on Monday that two or three Americans and one female British national were among the attackers. The claim sparked fierce speculation as to whether Samantha Lewthwaite, the British woman suspected of masterminding a terrorist cell in Kenya's second largest city of Mombasa, may have taken part in the incident.

Lewthwaite, 29, is the widow of Jermaine Lindsay, who blew up an underground train at King's Cross in July 2005 killing 26 people. She is believed to be in east Africa after having escaped a police raid on a property in Mombasa. But while witness and intelligence reports have claimed that one of the terrorists was an armed, white female, official sources have maintained that all the attackers were men.

As international interest in the Westgate attack mounts, with the death toll of 62 – including British, Canadian, American, Chinese, French, Ghanaian, Indian, Dutch, Peruvian, South African and South Korean victims – expected to rise, Kenyan authorities are under intense pressure over their handling of the investigation.

"We really need proper investigations. Kenya has been bungling all investigations it has handled in the past," said David Ohito, vice-chair of the Kenya Editors Guild. "We need to expose the gaps that allowed these attackers to run into the mall, stay there for days, making it very difficult for our security forces to overcome. There will be begging questions and we will be waiting for answers from the authorities."