BEIRUT -- Two attacks near a Syrian town just captured by Turkish forces and Syrian opposition fighters from ISIS killed at least 60 people, mostly civilians, and two Turkish soldiers on Friday, as the group retreats from one of its last remaining strongholds in northern Syria, Turkey’s news agency and Syrian activists said.

A suicide car bomb went off Friday outside a security office operated by Syrian opposition north of al-Bab, killing 60 people.

ISIS claimed responsibility for the attack, saying it had killed eight Turkish troops and 60 Syrian rebels, but most of the dead were civilians who had gathered to return home to the town liberated from ISIS only a day earlier.

Get Breaking News Delivered to Your Inbox

At least six rebel fighters were among those killed in the attack, according to Turkey’s Prime Minister, who spoke in Ankara.

According to Mohammed al-Tawil, a leading Syrian opposition fighter north of al-Bab, a suicide attacker blew up his small pick-up truck outside a security office in Sousian village, about 5 miles north of al-Bab. He said the explosion went off as the opposition fighters were organizing the return of civilians from al-Bab who had been displaced by the fighting for their town.

“These people have suffered a lot,” al-Tawil told The Associated Press in a telephone interview from Sousian. “They have been waiting for this moment” to return home.

Al-Tawil, a member of the opposition al-Bab military council, said about four fighters manning the checkpoint were killed in the attack. Al-Tawil, who was at the security office at the time of the explosion, said the rest of the casualties were civilians from al-Bab.

Al-Bab, which had been controlled by ISIS since late 2013, was captured on Thursday, after more than two months of intense fighting led by Turkish troops supporting Syrian opposition fighters.

ISIS militants who withdrew from the town still control areas around it. The Sousian security office was supervising the issuing of permits and providing escorts for civilians wishing to return to al-Bab. Al-Tawil said at least two groups of about 150 civilians had already left early on Friday for al-Bab, accompanied by a mine sweeping unit run by Syrian opposition fighters.

Hours later, a second explosion was reported south of al-Bab, where two Turkish soldiers were killed, Turkey’s military said. The military said the two soldiers were killed when an explosive device went off as they were removing land mines. The Britain-based Syrian Observatory for Human Rights also said the soldiers were killed when an explosive device went off near Tadif, an ISIS-controlled town south of al-Bab. But the Turkish Prime Minister Binali Yildirim, however, called the explosion a “suicide attack.” It was not immediately possible to reconcile the accounts.

The deaths Friday bring to 70 the total number of Turkish soldiers killed in Syria since August.

The Observatory’s head Rami Abdurrahman said Turkish artillery have been intensely shelling IS-controlled Tadif Friday.

Turkey’s Anadolu news agency said at least 41 of those wounded in the attack in Sousian were taken to the Turkish border town of Kilis, where they are being treated in a state hospital. Some of the wounded were in serious condition, the agency said.

The Observatory said at least seven opposition fighters were killed in the town by land mines left behind by ISIS - a trademark of the retreating militants.

Al-Bab had a prewar population of about 60,000, many of whom were displaced to neighboring areas, including during the most recent clashes.

Footage emerging from al-Bab showed a deserted town, badly damaged by the war. At least one of the streets appears completely wrecked, with buildings damaged or leveled on both sides. Trenches and earth berms have made other streets unpassable, and nearly every building shows some signs of artillery shelling or heavy machine-gun fire.

Meanwhile, the U.N. envoy for Syria has kicked off his second day of meetings aimed to reach a political solution to end the country’s war by hosting a delegation from the government of President Bashar Assad.