Up to 50 shoppers in Nairobi's luxury Westgate mall could be hostages of fanatical al-Shabaab Somali militants.

Gunmen threw grenades and opened fire on Saturday, killing at least 22 people in an attack targeting non-Muslims at an upscale mall in Kenya's capital that was hosting a children's day event, a Red Cross official and witnesses said.

Eyewitnesses said at least 36 people had been taken hostage by militants armed with AK 47s. Some were wearing hijabs, and women fighters are believed to be among the attackers.

Muslims were ordered to leave by the terrorists as families of wealthy Kenyans and white expatriates fled for their lives or hid in shops and toilets..

The attackers remained inside and firing subsided as the military surrounded the mall. People continued to trickle out from hiding places within the Westgate mall, which is in Nairobi's affluent Westlands neighbourhood.

Kenya Red Cross official Abbas Gullet said at least 22 people were killed in the attack, which police blamed on terrorists. He said the death toll would probably rise.

"We are treating this as a terrorist attack," said police chief Benson Kibue.

Police did not say which group was responsible for the attack.

Somali's rebel group al-Shabaab vowed in late 2011 to carry out a large-scale attack in Nairobi after Kenya sent troops into Somalia to fight the Islamic insurgents.

Off duty Sgt. Major Frank Mugungu said he saw four male attackers and one female, and that he could clearly identify one of the gunmen as a Somali, though he could not identify the rest.

The Westgate mall, with shops like Nike, Adidas and Bose, has long been identified as a likely terrorist target.

Elijah Kamau, who was at the mall at the time of the midday attack, said that the gunmen made a declaration that non-Muslims would be targeted.

"The gunmen told Muslims to stand up and leave. They were safe, and non-Muslims would be targeted," he said.

Jay Patel, who sought cover on an upper floor of the mall when shooting began, said that when he looked out of a window on to the upper parking deck of the mall he saw the gunmen with a group of people.

Patel said that as the attackers were talking, some of the people stood up and left and the others were shot.

The gunmen carried AK-47s and wore vests with hand grenades attached, said Manish Turohit, 18, who hid in a parking garage for two hours.

"They just came in and threw a grenade. We were running and they opened fire. They were shouting and firing," he said after being marched out of the mall in line with about 15 people who held their hands in the air.

Shopping trolley evacuation, Nairobi mall siege
Injured person wheeled away from Westgate mall, Nairobi, in shopping trolley (Reuters/Goran Tomasevic) Reuters/Goran Tomasevic

Rob Vandijk, who works at the Dutch embassy, said he was eating at a restaurant inside the mall when attackers lobbed hand grenades inside the building. He said gunfire then burst out and people screamed as they dropped to the ground.

It appears the attack began at the outdoor seating area of Artcaffe at the front of the mall, witnesses said.

Patrick Kuria, an employee at Artcaffe, said: "We started by hearing gunshots downstairs and outside. Later we heard them come inside. We took cover. Then we saw two gunmen wearing black turbans. I saw them shoot."

Some people were shot at the entrance to the mall after volleys of gunfire moved outside and a standoff with police began. Ambulances continued to stream in and out of the mall area, ferrying the wounded who gradually emerged from hiding inside the mall.

People clutched their small children, and some cried. At one point in the day mall guards used shopping carts to wheel out wounded adults and children.

A local hospital was overwhelmed with the number of wounded being brought in hours after the attack, so they had to divert them to a second facility.

ALSO READ: Shocking images emerge of Nairobi mall siege