LABWEH, Lebanon (AP) -- Militants from Syria who overran a Lebanese border town mostly withdrew back across the rugged hills separating the two countries as a cease-fire appeared to hold Thursday, allowing Lebanese troops to free seven fellow soldiers and ambulances to evacuate dozens of casualties.
The seizure of Arsal over the weekend marked the first time that Islamic extremists from Syria carried out a large-scale incursion into Lebanon and raised fears of a further spillover of the conflict across the porous border.
A senior Lebanese security official said the majority of the fighters had withdrawn by mid-Thursday.
As the militants pulled back, the extent of the fighting that began Saturday became clearer. Sunni clerics who negotiated the cease-fire uploaded videos of wounded, wailing children and photographs of dead children.
"We were weeping to see people in need. We had some bread, and people were fighting for the bread," said Sheik Hussam al-Ghali of the Association of Muslim Clerics, who oversaw the negotiations. "I went to some of the (Syrian refugee) camps. The stench of death was very strong," he told media on the outskirts of Arsal.
Red Cross official Abdullah Zogheib said the group evacuated 42 wounded people Thursday, most of them women and children.
Later, up to 150 cars packed with Syrian refugees were seen leaving Arsal. A security official in eastern Lebanon said arrangements were made for them to cross back into Syria through the Masnaa border crossing.
"We fled from the shelling, terrorists and gunmen," said a Syrian man who identified himself as Abu Hadi, leaving with his family in a pick-up truck.
It was not immediately clear where in Syria the refugees were going, but many may have been fleeing the violence in Arsal for areas inside their country where there has been less fighting recently.
The fighting in Arsal began Saturday when militants from Syria overran the town, seizing Lebanese army posts, soldiers and policemen, and demanding the release of a rebel commander detained in Lebanon. The militants included fighters from the Islamic State group as well as from the Nusra Front, al-Qaida's official Syrian affiliate.
At least 17 soldiers have been killed in the clashes, which trapped tens of thousands of Lebanese civilians and Syrian refugees in Arsal, and ratcheted up tensions inside Lebanon between supporters and opponents of the uprising against Syrian President Bashar Assad.
As the truce negotiated overnight appeared to hold, the Lebanese army said it had freed seven soldiers who had been captured by the militants, without providing further details. Twelve more soldiers are still missing along with an unknown number of policemen.
A field hospital in Arsal said 38 people had been killed in the fighting by Wednesday. The Association of Muslim Clerics posted photographs of at least two dead little girls it said were killed in Arsal, alongside videos and photographs of wounded children, on its Facebook page.
Cleric al-Ghali and a pro-rebel activist who uses the name Ahmad Alquseir said that some Syrian tent encampments near Arsal were struck and burnt by shelling.
In Syria meanwhile, militants from the Islamic State group overran one of the last remaining army bases in the northeastern Raqqa province, activists said Thursday.
The militants seized the Brigade 93 base overnight after days of heavy fighting, according to Rami Abdurrahman, head of the Syrian Observatory for Human Rights, and the Raqqa Media Center, an activist collective. The base lies some 40 miles (60 kilometers) from the provincial capital of Raqqa, a stronghold for the Islamic State group.
Abdurrahman said dozens of Syrian soldiers were killed. The Britain-based Observatory obtains its information from activists on the ground in Syria. State media did not report the incident.
A video uploaded to social media networks showed heavily armed men with thick beards -- who claimed to be from the Islamic State group -- walking through the military base, showing off trucks, tanks, assault rifles and boxes of ammunition left behind by fleeing soldiers.
"We will not stop until we liberated the blessed land of the Levant. Our aim isn't just the Levant. It is the whole world," said one fighter in broken Arabic, vowing to overrun Saudi Arabia next.
Photographs uploaded by supporters of the Islamic State showed fighters posing beside dead bodies, at least one of them beheaded.
The Islamic State group, an al-Qaida breakaway, has seized wide swaths of Syria and Iraq, where it is imposing an ultraconservative version of Muslim law, including killing people seen as apostates, and beheading and crucifying rivals.
Associated Press writer Diaa Hadid contributed to this report from Beirut.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.