BEIRUT -- Dozens of female detainees were quietly freed by Syrian authorities, activists and a lawyer said Thursday, the latest in a three-way prisoner exchange made more remarkable because rival factions largely oppose any bartered deals in the civil war.

Simultaneously, a Syrian court ordered the release of Tal al-Mallohi, a prominent young Syrian blogger who was convicted of spying for a foreign country, said her Damascus-based lawyer, Anwar al-Bunni.

The 61 women were released Wednesday, according to the Britain-based Syrian Observatory for Human Rights. Around a dozen were released at dawn, the rest in the evening, the group said.

Most of them were released from Damascus' central prison and from lockups in military compounds, al-Bunni said, citing information from human rights lawyers.

Al-Bunni and the rights group said the release was part of a complicated hostage swap last week brokered by Qatar and the Palestinian Authority.

In the deal, Syrian rebels freed nine Lebanese Shiite Muslims, while Lebanese gunmen simultaneously released two Turkish pilots.

Lebanese officials earlier said a third part of the deal called for the government of Syrian President Bashar Assad to free a number of female detainees to meet the rebels' demands. Lebanese officials weren't available for comment Thursday.

Syrian officials would not comment. They typically do not acknowledge having any contact, directly or indirectly, with Syrian rebels in the civil war, apparently worried it would tacitly acknowledge their legitimacy.

"They are embarrassed," said lawyer al-Bunni.

Warring factions have quietly agreed to prisoner swaps and even truces from time to time, even though both sides have so far held off on any negotiations that would end the conflict. The Syrian uprising has killed tens of thousands, devastated the country and caused about one-third of Syria's 23 million people to flee their homes.

It was not immediately clear if al-Mallohi was part of the broader prisoner swap.

Al-Bunni said the blogger's prison sentence had ended two months ago.

"We just can't say if they just decided to give her back her rights, or if it was related," al-Bunni said, speaking by phone from Damascus.

The lawyer said that following the court order, he expected her to be freed in the coming weeks.

Al-Mallohi was arrested in 2009 and sentenced to five years in prison shortly before the uprising against Assad began in March 2011. She was 19 at the time.

Her blog focused primarily on the suffering of Palestinians. It wasn't clear if al-Mallohi's arrest was connected to the blog.

The involvement of officials from Lebanon, Syria, Turkey, Qatar and the Palestinian Authority showed how the Syrian crisis, now in its third year, has involved the wider region.

In neighbouring Lebanon, clashes between rival sects in the northern city of Tripoli killed seven people since clashes flared earlier this week, security officials said.

The civil war has had a particularly damaging effect on already-tense sectarian tensions in Tripoli, Lebanon's second-largest city.

The rival gunmen come from two impoverished Tripoli neighbourhood, home to Assad opponents and supporters. The Bab Tabbaneh district is largely Sunni Muslim, like Syria's rebels. The other neighbourhood, Jabal Mohsen, mostly has residents of Assad's Alawite sect, a Shiite Islam offshoot.

The latest round of fighting began four days ago. Tensions had been mounting since Oct. 14, after a after a Lebanese military prosecutor pressed charges against seven men, at least one of whom was from Jabal Mohsen, for their involvement in twin bombings near two Sunni mosques in Tripoli on Aug. 23 that killed 47 people.

Lebanon shares its northern and eastern border with Syria. Lebanon's Sunni leadership has mostly supported the rebels, while Alawites and Shiites have tied their fate to the Assad government. All sides have sent fighters to Syria.

In Lebanon's eastern Bekaa valley, meanwhile, Lebanese soldiers shot and killed two Syrian gunmen in a firefight after they refused to stop their vehicle, security officials said, speaking on condition of anonymity because they were not authorized to talk to journalists.

Also Thursday, power gradually returned to parts of Damascus after a rebel attack damaged a gas pipeline that supplies fuel to southern Syria. Video posted on the Internet showed a blaze in the distance as men could be heard praising God and urging children to follow them. The video was consistent with other reporting by The Associated Press.