Cuban President Raúl Castro, center, with Colombian President Juan Manuel Santos, left, and FARC leader Timoleón “Timochenko” Jiménez in Havana last year. Cuba is hosting the Colombian peace talks. (Desmond Boylan/Associated Press)

The Colombian government and FARC guerrillas have reached an agreement on a bilateral cease-fire and the rebels’ disarmament, two of the last major hurdles to ending 50 years of bloodshed.

The deal announced Wednesday is not a final peace accord, but it is a breakthrough that essentially amounts to an end to the fighting. It means the two sides have worked through some of the most sensitive aspects of their negotiations, particularly the nuts and bolts of getting 7,000 heavily armed FARC fighters to come down from the mountains, lay down their guns and begin a transition to civilian life under the protection of Colombia’s security forces, their lifelong enemies.

“After this accord, it’s very hard to imagine the government and FARC ever fighting on the battlefield again,” said Adam Isacson, a Colombia expert at the Washington Office on Latin America. “This was the last substantive item on the negotiating agenda, and they appear to have figured out the very thorny issues of managing FARC’s disarmament.”

Supporters of the peace process celebrated the news on social media with the hashtag #ElUltimoDiaDeLaGuerra, calling Wednesday “the last day of the war.”

Colombian President Juan Manuel Santos and FARC leader Timoleón “Timochenko” Jiménez will be joined by U.N. Secretary General Ban Ki-moon and other Latin American heads of state at a ceremony in Havana on Thursday to announce the agreement. U.S. diplomats also were en route to the Cuban capital, where the rebels and Santos’s negotiating team launched formal talks in 2012.

Embattled Venezuelan President Nicolás Maduro, who has a sometimes-tense relationship with Santos, will attend Thursday’s ceremony. His country is one of the “observer” nations at the Colombia talks.

An informal cease-fire with FARC, or the Revolutionary Armed Forces of Colombia, has already been in effect for six months, and despite scattered clashes, violence in rural Colombia has fallen to its lowest level in decades. But with Santos’s approval ratings sliding and Colombians growing increasingly frustrated with the slow pace of negotiations, the government has been under pressure to show progress and close out the talks.

FARC leaders are in less of a hurry and are deeply worried about their personal security as civilians, given the risk of retributive attacks by any number of enemies.

Santos said this week that a final peace deal could be signed by July 20, Colombia’s independence day. But previous attempts to put deadlines on the negotiations have been a bust. In September, Santos and Timochenko shook hands on a pledge to wrap up talks within six months, but that timetable broke down as negotiations dragged on.

Timochenko said on Twitter this week that the two sides should not repeat the mistake.

“Experience has shown that setting deadlines is damaging to the process, especially when we don’t have a deal,” he tweeted Tuesday. “We’re making progress, but there are still loose ends.”

Whatever deal the two sides reach will have to clear a significant final hurdle: approval by the Colombian public. The government has been pushing for a referendum that would subject the final peace accord to a simple yes-or-no vote. FARC hasn’t agreed on the form such a plebiscite would take, nor is it clear what would happen if the public — which dislikes the group by a wide margin — rejects the deal.

Campaigning hard against it is powerful senator Álvaro Uribe. During his 2002-2010 presidency, Uribe debilitated the guerrilla ranks and killed several top rebel leaders with help from the United States through the $10 billion Plan Colombia.

But Uribe was unable to finish off the rebels on the battlefield. He has become the biggest critic of Santos and the peace process, depicting it as a shameful capitulation to a terrorist group widely condemned for drug trafficking, extortion, kidnapping and other crimes.

Details of the latest agreement were not released Wednesday, and still unknown are the critical logistical elements of the FARC demobilization. The guerrillas have insisted all along that their emergence from Colombia’s jungles and mountains should not be treated as a surrender.

Instead, they will gather in “concentration zones” to begin handing over their weapons — but to officials from the United Nations, not the Colombian military. The zones will be in rural areas where FARC is a potent force and, in some cases, supplants the government.

The latest polls of Colombian attitudes toward the peace negotiations underscore the contradictory feelings the talks have stirred in a country whose entire modern history has been marred by civil war. Although Santos’s approval rating has slipped to about 20 percent and a majority of Colombians think the talks are “on the wrong track,” recent surveys indicate that once a peace deal is on the table, voters will take it, even if they have to hold their noses to do so.

The government also has entered talks with the ELN, the country’s second-largest rebel group. The ELN, or National Liberation Army, retains an estimated 1,500 to 2,000 fighters and has staged deadly ambushes this year against security forces.