Colombian President Juan Manuel Santos speaks during the campaign "Pedagogy for Peace" to inform people about the peace talks between the government and the FARC guerrillas. (Luis Robayo/AFP/Getty Images)

After 52 years of fighting and nearly four years of grinding negotiations, the Colombian government and the country’s FARC rebel group declared Wednesday that they had reached an agreement to end the longest-running armed conflict in the Americas.

“The war is over,” said Humberto de la Calle, the government’s lead negotiator, after signing the accord with his guerrilla counterparts.

The two sides made the announcement in Cuba, where the negotiations began in 2012 and where Fidel Castro launched a communist revolution that inspired guerrilla insurgencies across the hemisphere. Colombia, a nation of 50 million that is among the closest U.S. allies in Latin America, is the one place where war has yet to end.

“We have finished fighting with weapons and will now do battle with ideas,” said FARC’s chief negotiator, Iván Márquez, a former member of Congress who took up arms after many other leftist Colombian politicians were assassinated by right-wing groups in the 1980s.

In their statements, the two negotiators described the accord as a road map for the transformation of Colombia, ending a sordid history of political violence and creating a more democratic society in a country long dominated by a well-to-do elite.

Colombia's President Juan Manuel Santos' government and the leftist FARC rebels have signed a peace deal, which will end one of the world's longest conflicts as long as the referendum is approved. (Reuters)

Colombian President Juan Manuel Santos followed the announcement with a nationally televised address, summarizing the deal’s main points for a Colombian public that retains a large measure of skepticism and confusion about the agreement. “Today is the beginning of the end of suffering, pain and tragedy of the war,” he said.

Although the reaction to the accord was subdued in Colombia, images of some Colombians celebrating in the streets began circulating on social media.

More than 220,000 Colombians have been killed in fighting over the past half-century, and nearly 7 million have been driven from their homes. But one major obstacle remains for the peace deal to stick.

Colombian voters must ratify the accord in a vote that Santos said would take place Oct. 2. That plebiscite is shaping up as a showdown between Santos and his biggest political rival.

Santos will be campaigning for the accord’s approval. His nemesis, former president Álvaro Uribe, is leading the drive to sink the deal. He and other critics say it is too favorable to FARC leaders, whose guerrilla war tactics included kidnapping, drug trafficking and killings. Opinion polls have yielded mixed results on whether Colombians are likely to approve the peace deal.

[Biggest obstacle to peace in Colombia may not be FARC, but an ex-president]

One element of the accord that was made public for the first time Wednesday and that is likely to stir controversy governs the FARC’s return to representative politics. The FARC will be given a limited number of representatives in Congress as part of its transition to a political party. Those representatives will function as spokesmen, with no voting rights, and will be involved exclusively in matters pertaining to the implementation of the peace deal, Santos said. Rebel commanders will eventually be permitted to run for political office as full representatives if they are cleared of war crimes and other criminal charges.

If approved at the ballot box, the peace agreement would become law, and the FARC would begin demobilizing its 7,000 fighters at designated camps and “protected zones” with monitors from the United Nations. The rebel group — whose full name is the Revolutionary Armed Forces of Colombia — would have 180 days to fully disarm under the terms of the agreement.

“This is the final chapter of the Cold War in the hemisphere,” said Bernard Aronson, the U.S. envoy to the peace talks, in an interview before the announcement.

Aronson said he expected the Colombian government to publish a final text of the treaty within days. FARC commanders are planning to return to their remote camps in the mountains and jungles of Colombia, where they will hold a FARC “congress” to build support for the deal among rank-and-file rebels and prepare for disarmament and demobilization.

Wednesday’s announcement follows days of marathon negotiations between the government team and the guerrilla commanders. A final sticking point was the timing of a blanket amnesty that will be offered to lower-ranking guerrillas who face only charges of “rebellion,” in contrast with more-senior FARC members accused of committing more-serious crimes.

Under the terms of the accord, the higher-ranking FARC members will be able to avoid prison if they fully disclose their role in the war and make reparations as part of a truth-and-reconciliation process.

A matter of concern for FARC commanders has been the timing of their fighters’ move from their mountain redoubts into U.N. camps. The commanders have been reluctant to commit to that move before the plebiscite is completed, fearing that if it fails, the rebels would be stuck in the camps and partly disarmed, even though fighting could resume. Neither side said Wednesday when the guerrillas would begin their demobilization.

Santos did not travel to Havana for Wednesday’s ceremony, which did not occur with the same fanfare as a cease-fire announcement in June attended by U.N. Secretary General Ban Ki-moon and several countries’ leaders.

[Colombia announces cease-fire deal to end conflict with rebels]

Santos has acknowledged that peace with the FARC would end Colombia’s longest war — but not all of its armed conflicts.

His government has struggled to make progress in talks with a smaller guerrilla group known as the National Liberation Army, or ELN, which will be looking to enlarge its estimated force of 1,500 fighters with disaffected FARC soldiers who reject a transition to peaceful civilian life.

Julia Symmes Cobb in Bogota, Colombia, contributed to this report.

Read more:

Peace may be coming, so Colombia’s farmers are on a massive coca binge

Colombia’s peace process: What’s next and what’s at stake

An end to Colombia’s war seems close — except in rebel territory

Today’s coverage from Post correspondents around the world