Thirty-nine people were killed and 150 wounded in yesterday’s attack on a Nairobi shopping mall, Kenyan president Uhuru Kenyatta said in a televised address to the nation.

He said Kenya had “overcome terrorist attacks before, and we will defeat them again,” and told the nation he had also “personally lost family members in the Westgate attack”.

“Our security forces are in the process of neutralising the attackers and securing the mall,” he said, as security operations went on late into the night.

Somalia’s Al Qaeda-linked Al Shebab group said its fighters were behind the attack.

“They want to cause fear and despondency in our country, but we will not be cowed,” Kenyatta said, adding: “Terrorism is a philosophy of cowards.”

“I ask God to give you comfort. My government will provide the support needed in the days to come,” he said.

Shooting continued hours after the initial assault as troops surrounded the Westgate mall and police and soldiers combed the building, hunting the attackers shop by shop. A police officer inside the building said the gunmen were barricaded inside a Nakumatt supermarket, one of Kenya’s biggest chains.

“We got three bodies from this shop,” he said, standing a dozen metres from the supermarket entrance and pointing to a children’s shoe shop where blood lay in pools.

He turned to a nearby hamburger bar where piped music still played and food lay abandoned. “And a couple of bodies here.”

Al Shebaab, which is battling Kenyan and other African peacekeepers in Somalia, had repeatedly threatened attacks on Kenyan soil if Nairobi does not pull its troops out of the Horn of Africa country.

“The Kenyan govt (government) is pleading with our Mujahideen (holy warriors) inside the mall for negotiations,” the group said on its official Twitter handle @HSM_Press. “There will be no negotiations whatsoever at #Westgate.”

Another Al-Shebaab tweet read: “For long we have waged war against the Kenyans in our land, now it’s time to shift the battleground and take the war to their land.”

The assault was the single biggest attack in Kenya since Al Qaeda’s east Africa cell bombed the US embassy in Nairobi in 1998, killing more than 200 people. In 2002, the same militant cell attacked an Israeli-owned hotel and tried to shoot down an Israeli jet in a coordinated attack.

The Kenyan presidency said on its Twitter feed that one wounded gunman had been arrested, but had died in hospital.

The US State Department said it had reports that American citizens had been injured.

Tiles at the mall were smeared with blood, bullet casings were strewn on the floor and shop windows were shattered. A policeman dragged the corpse of a young girl across the floor and laid her on a stretcher. Two policemen lay on the floor with guns trained on the supermarket entrance.

Some local television stations reported hostages had been taken, but there was no official confirmation.

Kenyan forces first entered Somalia two years ago to try to stem incursions by Al Qaeda-linked militants.

Al Shebaab, which Kenya blames for shootings, bombings and grenade attacks against churches and the security forces, had threatened before to strike Westgate, a mall popular with the city’s expatriates, as well as other soft targets such as nightclubs and hotels known to be popular with Westerners.

Somali President Hassan Sheikh Mohamud said it was too early to draw conclusions. “We don’t have any proof that the people who did this are Somali,” he said in Washington.

One woman leaving the building told a journalist that one of the attackers had told all Muslims to leave the area. Survivors said at least one of the attackers was a woman.

Police helicopters circled above shortly after the initial assault as armed police shouted “Get out! Get out!” and scores of shoppers fled the sand-coloured stone building. Smoke poured from one entrance and witnesses said they heard grenade blasts.

Others said they saw about five assailants storm the mall.

The shopping centre includes a number of Israeli-owned businesses, though it was not immediately clear if these had been targeted specifically. At least four Israeli nationals escaped the assault, one with light wounds.

“As of now, this appears to be an internal Kenyan incident, that is, a terrorist attack but not one that specifically targeted Israelis,” an Israeli Foreign Ministry spokeswoman said.

One eyewitness who identified himself as Taha said he had heard the screech of brakes followed moments later by an explosion, and then sustained gunfire from the ground floor.

Satpal Singh, 36, who was in a cafe on the mall’s top floor, said he ran downstairs when he heard the gunfire and was shot at near the mall’s main exit.

65 killed in Baghdad attack

At least 65 people were killed in a triple bombing that targeted a tent filled with mourners in Baghdad’s Shia Muslim stronghold of Sadr City yesterday, police and medical sources said.

A car bomb went off near the tent where a funeral was being held, a suicide bomber driving a car then blew himself up, and a third explosion followed as police, ambulances and firefighters were gathering at the scene, police said.

No group immediately claimed responsibility for the attack, in which at least 120 others were wounded, medics said.