NAIROBI, Kenya (AP) — Witnesses say a Somali terror group with ties to al-Qaida killed at least 48 people in a Kenyan coastal town.

Some of the victims were slaughtered because they couldn't answer questions about Islam or didn't know the Somali language. A witness says Muslims were spared.

In addition to the killings, two hotels were set on fire.

The assault lasted several hours and began as residents watched World Cup matches on TV.

Authorities blamed the extremist group al-Shabab. It has vowed to carry out terror attacks to avenge the Kenyan military presence in Somalia. Along with its Somali fighters, the group also has many Kenyan adherents.

Kenya has experienced a wave of gunfire and explosive attacks in recent months.