AMMAN, Jordan — Seven Jordanian security officers, a Canadian tourist and two Jordanian civilians were killed by gunmen in the southern city of Karak on Sunday, according to a joint statement from the Public Security Department and the Jordanian armed forces.

The security forces later captured and killed four of the gunmen, the statement said. It did not specify the total number of what security officials called “terrorist outlaws” involved in the attacks, or suggest a motive. Officials were also investigating whether the gunmen had ties to any terrorist organization.

The violence began when a patrol was sent to check on reports of a house on fire. When security officers arrived on the scene, they were met with a barrage of gunfire from inside the home, injuring two officers. The gunmen fled, according to the statement.

Gunmen then attacked a police station in the city.

Later in the day, the police were informed that gunmen were hiding inside the Karak Crusader castle, a prominent tourist attraction on a hilltop. The gunmen fired at several police officers from the castle, security officials said.