Lebanon inked an agreement with Syria on Friday to hand some 300 convicts over to Damascus, a move seen as key to helping turn a new page in ties between the countries.
Overcrowded Lebanese prisons hold more than 2,200 Syrians held on various charges.
Many of them are still awaiting trial, while hundreds accused of "terrorism" or related offences including attacks on Lebanese forces have been brought before military courts, according to AFP.
Others are in custody for alleged membership in militant or armed groups that were opposed to now ousted Syrian president Bashar al-Assad, who was supported by Lebanon's Hezbollah group during the Syrian civil war.
Lebanese Deputy Prime Minister Tarek Mitri and Syrian Justice Minister Mazhar al-Wais announced the signing of the agreement at a press conference in Beirut.
Wais called it "an important step on the path to justice in addressing the situation of convicts who have spent a long time in prison and whose cases were among the most complex legally".
The agreement covers around 300 convicts, while the remaining detainees require "long procedures" before a similar agreement on them can be reached, Wais said.
The deal reinforces "the trust and political will that already exists between the two countries", he said, expressing hope it would help improve ties.
Lebanese authorities have said that the convicts who meet the requirements, including having spent at least 10 years behind bars, will be handed over to Syria where they will serve the rest of their sentences.
Mitri told AFP that cooperation extended beyond the issue of convicts, with officials working to "resolve all common issues that will set bilateral relations right".
The first step following the deal's signing would be a cabinet decision to "abolish the Lebanese-Syrian Higher Council", an Assad-era body.
Authorities will also review "unfair agreements concluded during the time of Syrian tutelage in Lebanon, as well as the demarcation of the land and maritime borders", Mitri added.
Syria's army entered Lebanon in 1976 as part of an Arab force that was supposed to put an end to the Lebanese civil war which began a year earlier.
Instead Syria became the dominant military and political force in Lebanon, looming over all aspects of Lebanese life.
Syrian forces only withdrew from the country in 2005 after enormous pressure following the assassination of former prime minister Rafic Hariri, a killing attributed to Damascus and its ally Hezbollah.