* Somali Islamists linked to al Qaeda claim attack
* Group wants withdrawal of Kenyan troops from Somalia
* President loses relatives in raid, vows punishment
* Volleys of gunfire, helicopters swoop low over mall
Islamist militants were holding hostages on Sunday at a shopping mall in Nairobi, where at least 68 people were killed in an attack by the Somali al Shabaab group, which demanded that Kenya pull troops back from its neighbour.
Brief volleys of gunfire and a blast interrupted hours of stalemate. A Reuters correspondent saw security personnel on the move and, as dusk closed in, two helicopters swooped low over the Westgate shopping centre, which has several Israeli-owned outlets and is frequented by prosperous Kenyans and foreigners.
Mobile phone signals began to fail in the area as darkness fell. Kenya's president, vowing to stand firm against Somali militants, was cautious about the outcome, saying chances of the attackers being "neutralised" were "as good ... as we can hope for".
"We will punish the masterminds swiftly and painfully," he said. In addition to the dead, more than 175 people were wounded in an attack that began around the middle of the day on Saturday, when the mall was heaving with customers.
Officials did not say how many hostages were being held, although one Kenyan television station cited a figure of 30. Trapped individuals emerged, dwindling as the day went on.
The focus of attention on Sunday was the mall's branch of Nakumatt supermarket, one of Kenya's biggest chains. A Red Cross volunteer said nine more bodies were taken out of the store late on Sunday, which the Red Cross said raised the toll to 68.
Volunteers said they believed more corpses were still inside, unreachable for now.
British Prime Minister David Cameron, confirming three Britons were dead, said: "We should prepare ourselves for further bad news." U.S. President Barack Obama called Kenyan President Uhuru Kenyatta to offer condolences and support.
Previous such raids, in Russia, the 2008 Mumbai attacks or January's al Qaeda assault on an Algerian gas plant, have generally ended with many hostages losing their lives.
Foreigners including a French mother and daughter and two diplomats from Canada and Ghana were killed in Saturday's attack, which was claimed by al Shabaab. Other victims came from China and the Netherlands. U.S. citizens were injured.
Shortly after Sunday's shots were fired, troops in camouflage ran below a restaurant terrace along the front of the building that had buzzed with customers when the attack began.
'WE SHALL NOT RELENT'
Scores of Kenyans gathered on Sunday at a site overlooking the mall, awaiting what they expected to be a violent denouement. "They entered through blood, that's how they'll leave," said Jonathan Maungo, a private security guard.
President Kenyatta, facing his first major security challenge since being elected in March, said he lost a nephew and his fiancée in the raid and vowed to defeat the militants.
In an address, he urged wealthy governments not to warn their citizens against visiting a country heavily dependent on tourist income, while insisting he would not pull out Kenyan troops from Somalia: "We shall not relent on the war on terror."
Saying all the gunmen were now in one place, Kenyatta added: "I assure Kenyans that we have as good a chance to successfully neutralise the terrorists as we can hope for."
But the heavily armed and well disciplined attackers, still unidentified, had shown no hesitation in killing civilians.
The spokesman for al Shabaab's military operations told Reuters in Somalia his group had nothing to fear: "Where will Uhuru Kenyatta get the power with which he threatened us?" said Sheikh Abdiasis Abu Musab.
The assault was the biggest single attack in Kenya since al Qaeda's East Africa cell bombed the U.S. Embassy in Nairobi in 1998, killing more than 200 people.
Al Shabaab's siege underlined its ability to cause major disruptions with relatively limited resources.
"In terms of capacity, while the group has grown considerably weaker in terms of being able to wage a conventional war, it is now ever more capable of carrying out asymmetric warfare," said Abdi Aynte, director of Mogadishu's Heritage Institute of Policy Studies.
COMBING THE MALL
Kenyatta, who said Kenya was still trying to establish conclusively who was responsible, said women were among the 10 to 15 attackers. Asked whether hostages had explosives strapped to them, he said he would not comment on operational issues.
Kenya's deputy president, William Ruto, asked judges at the International Criminal Court in The Hague to allow him to return home to help deal with the siege and its aftermath.
He and Kenyatta face charges of crimes against humanity for their alleged role in coordinating deadly violence after the contested 2007 elections, when they ran in rival camps. Both deny the charges. They won a vote on the same ticket in March.
The dead in Saturday's assault included children, and the wounded ranged in age from 2 to 78. More than 1,000 people were evacuated by security forces combing the mall, littered with shattered glass and pools of blood.
An Israeli security source said that Israeli advisers were at the scene helping Kenya to work out how to end the siege.
Kenya's National Disaster Operation Centre referred to a "major engagement" on its Twitter account when a blast was heard. "It's going on, it's going good," one Kenyan soldier who had been in the mall on Sunday told reporters as he left the scene. But later in the evening, the situation appeared calm.
After emerging on Sunday morning from a hiding place under vehicle in the basement car park, a woman, giving her name as Cecilia, told Reuters by telephone she had seen three men in the attack who looked like Arabs, judging by their skin colour.
"They were shooting from the exit ramp, shooting everywhere," she said. "I saw people being shot all around me, some with blood pouring from bad wounds. I was just praying, praying 'God, keep me alive' and that my day hadn't come."
Witnesses said the attackers had AK-47 rifles and wore ammunition belts. One militant was shot and arrested early on in the siege, but died shortly afterwards.
Al Shabaab, which is battling Kenyan and other African peacekeepers in Somalia, said Kenyatta must end their mission in Somalia, whose border lies 500 km (300 miles) from Nairobi.
Kenya sent troops into Somalia in October 2011 to pursue militants whom it blamed for kidnapping tourists and attacking its security forces.
Al Shabaab's last big attack outside Somalia was a twin assault in nearby Uganda, targeting people watching the World Cup final on television in Kampala in 2010, killing 77 people.