The Bolivian government and representatives of Amazon natives have finalized an agreement ending two months of protests that have eroded support for President Evo Morales. Morales announced Friday he was scrapping a hugely controversial plan to build a highway through an Amazon ecological reserve that triggered widespread protests -- but the protesters had 15 other demands they wanted addressed. Late Monday, following marathon negotiations and a nearly six-hour-long debate in the legislature, lawmakers approved a final deal and Morales signed it into law, officially ending the conflict. The lengthy talks allowed \"all points to be resolved, with deadlines for them to be fulfilled,\" said Fernando Vargas, a leader of the Amazon indigenous protesters. The Brazil-financed road project was to form part of a network linking land-locked Bolivia to both the Pacific through Chile and the Atlantic through Brazil. Some 2,000 protesters, who set out in August and trekked 600 kilometers (370 miles) to La Paz, were met as heroes as they entered the city in the high Andes and made their way to camp out near the presidential palace. About 50,000 people from three different native groups live in the remote Isiboro Secure National Park and Indigenous Territory (TIPNIS) in the humid Amazon lowlands. The 100 protestors still camped out in La Paz began gathering their belongings late Monday ahead of the long journey home.