BEIRUT — The bodies of at least 67 Syrian civilians, many summarily killed by the Islamic State group, have been discovered in a central town in Syria that government forces retook from the extremists over the weekend, the Syrian government and activists said Monday.

A senior Syrian official described the attack as a “shocking massacre,” saying the search for those killed in the town of Qaryatayn is still underway, and the body count was likely to climb.

Some were shot in the street as the militant extremists retreated from the town because they were suspected of working with the government, according to activists. At least 35 had been shot dead, their bodies dumped in a shaft.

The militants have been retreating across northern and eastern Syria, days after having been defeated in Raqqa, the one-time “capital” of the group’s self-proclaimed caliphate. The killings raise the specter of more revenge attacks by the group while it fights to hang on to its last strongholds in Syria.

In a video, filmed as Syrian government troops recaptured Qaryatayn, a town resident says militant “monsters” killed more than a 100 people, including soldiers and civilians.

“These are people who don’t know God, they don’t know anything. They killed children and women with knives, they beat women, broke their arms,” he said.

Talal Barazi, the governor of the surrounding Homs province, said Monday the killings went on for three weeks during which ISIS “terrorized” its residents.

“It is a shocking massacre,” he said.

The Britain-based Syrian Observatory for Human Rights said it had documented the killings of at least 128 people in Qaryatayn during the last days of IS control of the town. The head of the Observatory, Rami Abdurrahman, called it a “massacre.”

Syrian troops and allied militias regained control of the town on Saturday. The government-run Syrian Central Military Media at the time said the Syrian army and its allies restored security and stability to Qaryatayn after clearing the town of IS fighters.

The activist-run Palmyra Coordination Committee published the names of 67 civilians confirmed killed and said the number was likely to rise. It said at least 35 were found shot and dumped into a deep shaft.

The activist-run group said other bodies were also found in the town streets – apparently of people shot by pro-government forces and suspected of working with IS. The Observatory also said it documented at least 12 killed at the hands of pro-government troops after they regained control of the town.

IS militants first seized Qaryatayn in August 2015, and relied on the strategically located town to defend another of their bastions, the historic city of Palmyra. At the time, thousands of the town’s Christian residents fled, fearing the extremist group’s brutality.

With Russian backing, Syrian troops regained control of the town in April 2016. But IS, facing major setbacks around Syria and Iraq, launched a new attack on the town in late September and recaptured it.

At the time, Russia accused the United States, which is battling the Islamic State group, of looking the other way and allowing IS to attack Qaryatayn.

Most of the IS militants who were involved in attacks on the town were local residents. Pro-government media blamed the loss of Qaryatayn for the second time on what it described as militant “sleeper cells.”

There was no immediate comment from the government in Damascus on the discovery of the civilian bodies in Qaryatayn.