AMMAN, Jordan — The Islamic State claimed responsibility on Tuesday for a terrorist attack in the southern Jordanian city of Karak that killed 10 people, including the head of the military’s special forces, according to an organization that monitors militant groups.

As the authorities continued their investigation into the attack on Sunday, three gendarmes and a police officer were shot and killed in Karak as Jordanian security forces conducted raids, a spokesman for the Jordanian Public Security Department said.

In the statement released by the Islamic State, according to the SITE Intelligence Group, the militants said four fighters, “by virtue of God alone” and described as “caliphate soldiers,” carried out the attack on Sunday using automatic weapons and hand grenades.

Seven Jordanian security officers, a Canadian tourist and two Jordanian civilians were killed, and four attackers also died in the clashes. The assault began at a house where the gunmen were staying. They then fled and attacked a police station, before moving on to Karak’s ancient crusader castle, a popular tourist destination in the city.