Kenyan authorities are certain that al-Qaida is directly involved in the Westgate mall siege in Nairobi, and the attack is part of a wider international terror campaign by extremist organisations.

As fresh gunfire erupted at the mall, hours after the authorities claimed they had taken control of the shopping complex, Kenyan foreign minister Amina Mohamed told the Aljazeera television network that al-Qaida has played a direct role in the siege.

Originally officials thought that al-Qaida was merely influencing the siege through its proxy, al-Shabaab, but was not actively involved. However, this theory has now been modified.

Mohamed also told the PBS Newshour programme in the US that at least "two or three Americans and one British woman" have been involved in the deadly siege, which has killed 62 people and injured hundreds more.

The British woman is widely suspected to be Samantha Lewthwaite, nicknamed the "white widow", though there has been no official confirmation as yet.

The renewed gunfire in the shopping complex suggests some militants could still be holed up inside the mall - even though the Kenyan security forces had previously stated that the building has been entirely secured, with three insurgents killed and 10 arrested.

The military also claimed all hostages have been rescued, practically ending the three-day siege.

"Our special forces are inside the building checking the rooms. Obviously it's a very, very big building. We think that everyone, the hostages, have been evacuated, but we don't want to take any chances. The special forces are doing their job and yes, I think we are near the end," government spokesman Manoah Esipisu told the AFP.

"The special forces call this sanitising. It's a very complex and very delicate operation. At the moment they have not met any resistance, but of course we are not ruling out the possibility that there are a couple of them hiding in a remote room or corner."

The authorities say all the escape routes have been sealed. A military helicopter was also seen hovering above the mall.