Kenya Defence Forces operation at the Westgate shopping centre in Nairobi is reportedly over (Reuters)

A Kenyan senior security source said the military operation to retake control of a shopping centre in Nairobi that was besieged by terrorists is over, the BBC reported.

The country's interior ministry said its troops were "mopping out" the building and urged for patience.

The ministry also said three Kenya Defence Forces (KDF) soldiers have been killed and eight injured during fighting with al-Shabaab militants, who led siege to the upscale Westgate mall in the capital.

We've lost 3 heroes. 3 KDF soldiers have succumbed to their injuries, 8 are still under treatment. #WithOneAccord

A government official said Nairobi's city morgue is preparing for the arrival of a large number of bodies of people killed in the attack.

At least 65 people have been killed and 170 injured in the attack. Among the victims are six Britons, the UK Foreign and Commonwealth Office said.

Earlier a security expert with contacts inside the mall told AP that there were at least 30 hostages when the assault began, while the Red Cross said 51 people were still missing on Tuesday.

Al-Qaida-linked rebel group al-Shabaab has claimed responsibility for the attack that is believed to have been carried out by 10 to 20- strong commando units, including several foreigners armed with grenades and assault rifles.

Al-Shabaab tweeted the photo of two of its militants in the siege of Westgate shopping centre in Nairobi (Twitter)