BOGOTA, COLOMBIA — After five decades of war, more than four years of negotiations and two signing ceremonies, Colombia's congress late Wednesday formally ratified a peace agreement allowing leftist rebels to enter politics.



The 310-page revised accord was approved unanimously by the lower house, which voted a day after the Senate approved the same text 75-0 following a protest walkout by the opposition led by former President Alvaro Uribe.



The accord introduces some 50 changes intended to assuage critics who led a campaign that saw Colombians narrowly reject the original accord in a referendum last month. Revisions range from a prohibition on foreign magistrates judging alleged crimes by government troops or by the Revolutionary Armed Forces of Colombia to a commitment from the rebels to forfeit assets, some amassed through drug trafficking, to help compensate their victims.



But the FARC wouldn't go along with the opposition's strongest demands — jail sentences for rebel leaders behind atrocities and stricter limits on their future participation in politics.



"There needs to be a balance between peace and justice, but in this agreement there's complete impunity," Uribe, now a senator, said during Tuesday's heated debate. Other senators accused him of standing in the way of a peace deal that he pursued with the FARC as president in 2002-10.



President Juan Manuel Santos said ratification will set in motion the start of a six-month process in which the FARC's 8,000-plus guerrillas will concentrate in some 20 rural areas and turn over their weapons to United Nations monitors.



"Tomorrow a new era begins," Santos said Wednesday, celebrating the Senate's endorsement and the expected approval by the lower house.



But the rebels insist that their troops won't start demobilizing until lawmakers pass an amnesty law freeing some 2,000 rebels in jail.



"D-Day starts after the first actions are implemented," the rebel leader "Pastor Alape," a member of the FARC's 10-member secretariat, told foreign journalists last week after the new accord was signed. "The president unfortunately has been demonstrating an attitude that creates confusion in the country."



The debate over amnesty highlights one of the peace deal's early challenges: the need for congress to pass legislation implementing the accord and setting up special peace tribunals.



Santos was initially counting on swift approval of the needed changes that in some cases require constitutional amendments. But the referendum loss has left the status of his fast-track authority in doubt, awaiting a ruling by the constitutional court. Experts say a solid pro-peace coalition could crumble if implementation drags on and butts against the political maneuvering for the 2018 presidential election.



Beyond the legal hurdles, there is also concern FARC fighters will wind up joining criminal gangs rampant throughout the country or the much-smaller rebel National Liberation Army, which for months has been playing cat and mouse with the government over opening a peace process of its own. On Wednesday, both sides said they would delay until January any decision about when to start talks.



Combating security threats will test the state's ability to make its presence felt in traditionally neglected rural areas at a time of financial stress triggered by low oil prices.



There is also a risk that peace could trigger more bloodshed, as it did following a previous peace process with the FARC in the 1980s. At that time, thousands of former guerrillas, labor activists and communist militants were killed by right-wing militias, sometimes in collaboration with state agents.



Worries about new bloodshed, although less prevalent than in the darker days of Colombia's half-century conflict, has become more urgent with more than a dozen human rights defenders and land activists in areas dominated by the FARC being killed by unknown assailants since the initial signing ceremony in September. So far this year, 70 have been killed, according to Bogota-based We Are Defenders, more than in all of 2015 and 2014.