Al Qaeda-linked Somali gunmen early on Monday hurled grenades from inside Nairobi's Westgate shopping mall at security forces trying to rescue the remaining hostages, an eyewitness told Xinhua.

The witness said nobody was injured in the incident that took place when Kenyan security forces were preparing for the final assault against the militants who stormed the upscale market frequented by wealthy Kenyans and expatriates on Saturday.

"These gunmen threw grenades this morning from inside the mall. However, nobody was injured in the incident,” the witness, who did not want to be named, told Xinhua news agency.

“It seems they are worn out. Maybe they want to blow up themselves and the entire building. They did the same thing overnight," the witness said.

There was heavy gunfire after the Kenya Defence Forces (KDF) confirmed they had secured most of the building as they strove to bring the operation which entered its third day Monday to a "speedy conclusion".

"Most of the hostages have been released and KDF has taken control of most parts of the building. We believe there are no more than 10 hostages remaining inside the building," KDF spokesperson Cyrus Oguna said.