The government and the FARC rebel group reached a deal Wednesday that would allow rebel commanders to exchange their weapons for a future in politics, an important advance that analysts say leaves little doubt there will be a final peace pact in the months ahead.

With an agreement on political participation for the guerrillas, the government and the Revolutionary Armed Forces of Colombia have made breakthroughs on two of the most difficult points in the framework agenda for negotiations to end 50 years of conflict. In May, the sides agreed on a program of land distribution and titling to resolve unrest in the countryside that has long spawned political violence.

“There is no going back — this process is moving forward,” said León Valencia, a former guerrilla who is director of the Peace and Reconciliation Foundation, a think tank that has studied the peace process. “They have basically reached an agreement that goes to the heart of negotiations. Everything else is just complementary.”

A statement issued by the two sides in Havana, where the talks have been taking place over the past year, was vague about the latest agreement. It said there would be “rights and guarantees” for the “new movements that emerge from the signing of a final accord.”

Analysts who follow the peace talks and have been in contact with negotiators say the FARC’s objective is to form a new party and receive posts in the national legislature in exchange for disarming.

But an official in the government of President Juan Manuel Santos, speaking on the condition of anonymity because of the delicate nature of the discussions, said the details of how that will happen will be negotiated after the rebels lay down their weapons. And Colombian judges — not the government or the rebels — will decide which of the FARC’s commanders, many of whom are accused of war crimes, can participate in politics.

Still, the sides saw the latest development as a breakthrough that would bring peace to a country that has long been plagued by guerrilla groups and illegal paramilitary organizations.

“We want this to be a peace with everyone and for everyone,” Humberto de la Calle, the government’s chief negotiator, told reporters in the Havana convention center where the talks are being held. “We have an opportunity, here and now, to agree on the end of the conflict and begin the consolidation of peace. That is the great national longing.”

Luciano Marín, a FARC commander better known here by his alias, Iván Márquez, said the pact creates an opening for those who have not felt represented in Colombia’s political system.

In comments carried by Semana magazine, he said the latest development “gives us optimism to advance in debates to sign a peace pact and end the conflict.”

The news from Havana was a setback for powerful opponents of the process led by former president Álvaro Uribe, who accuses the Santos government of selling out to the FARC.

Alfredo Rangel, a close ally of Uribe, told Colombian television that the government was setting the stage for “an armed peace that is rejected by the vast majority of Colombians.” He said he worried that FARC commanders would go straight from the jungles to the legislature, without paying for their crimes, and then work to install a government with close ties to leftist Cuba and Venezuela.

Virginia Bouvier, the head of the Colombia program for the U.S. Institute of Peace, said the pace and give-and-take nature of the talks have frustrated some in Colombia. But she said the negotiations had to find a common vision for the two sides.

“The talks can’t be seen as who’s conceding to whom, but whether the agreements being reached will be good for the country as a whole,” said Bouvier, whose nonpartisan organization, which works to mitigate conflicts, is funded by the U.S. Congress.

In the latest stage of negotiations, that has meant working on a framework that would open the door for FARC commanders, many of whom are reviled here, to become players on the political stage, where they will fight policies such as Colombia’s trade agreement with the United States and the role American multinational corporations play here.

“The FARC had to be recognized as becoming a political actor,” said Aldo Civico, a Rutgers University conflict resolution scholar who has talked to negotiators here. “This is really a hard thing for the government and the country to swallow. But it was something that is very important to the FARC.”

The agreement could not have come sooner for Santos, whose popularity has fallen in recent weeks as opponents criticized the government’s handling of talks. Santos is expected to soon announce that he will run for a second term in 2014, and a signed final peace accord would help him secure another four years.

The two sides in the talks will soon begin discussions on how to thwart drug trafficking in the rural areas where the FARC remains strong. They also need to discuss how to deliver justice for those victimized in the conflict and what logistical steps must then be taken that will lead to a full-scale disarmament and an end to hostilities.

Marina Villeneuve contributed to this report.