Lebanon on Friday signed a deal with Syria to transfer around 300 convicted prisoners to Damascus, a step viewed as an important move toward resetting relations between the two countries.

Overcrowded Lebanese prisons host more than 2,200 Syrians held on various charges.

Many of them are still awaiting trial, while hundreds accused of "terrorism" or related offenses, including attacks on Lebanese forces, have been brought before military courts.

Others are in custody for alleged membership in terrorist or armed groups that were opposed to the now ousted Syrian dictator Bashar 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 news conference in Beirut.