Under the terms of the Taif Accord , the 1989 agreement that set the terms for the end of Lebanon 's civil war , Syria was to negotiate a full pullout with the Lebanese government , which has long been beholden to Damascus .