IT IS rare nowadays to find an American foreign policy that is a clear success. Yet that applies to Plan Colombia. When it was devised in 1999 by the administrations of Bill Clinton and Andrés Pastrana, then Colombia’s president, the country was on the brink of becoming a failed state, with much of its territory at the mercy of guerrillas, paramilitaries and drug traffickers. The plan, under which the United States has provided Colombia with almost $10 billion in mainly military aid, had plenty of critics. Too skewed towards trying to win the unwinnable war on drugs by spraying coca fields from the air, and too compromised by giving money to an army stained by human-rights abuses, they said.

The critics missed the point. Plan Colombia was sold politically in the United States as a crackdown on drugs, but in reality it was always first and foremost a counter-insurgency strategy. For Colombia to be a viable democracy, it needed a stronger state able to provide security to its citizens and to tame the illegal armies, which were financed by the world’s cocaine habit. It worked. Colombians backed the strategy—American aid was more than matched by increased domestic spending on security. Under Álvaro Uribe, who followed Mr Pastrana as president, the paramilitaries demobilised and the FARC guerrillas were battered so hard that they agreed, in 2012, to start peace talks with the government of Juan Manuel Santos, Mr Uribe’s successor (and his former defence minister).

All being well, the talks will culminate in an agreement by March 23rd, and the FARC’s demobilisation. So it is appropriate that Barack Obama has invited Messrs Santos, Uribe and Pastrana to Washington on February 4th to commemorate “15 years of bipartisan co-operation through Plan Colombia”, along with George W. Bush and Mr Clinton. Mr Pastrana, a largely forgotten figure, was quick to accept. The election campaign in the United States may make it hard for Messrs Bush and Clinton to do so. According to Semana, a newsweekly, Mr Uribe, too, may stay away, vitiating one of the meeting’s tacit aims—to shore up bipartisanship in Colombia.

Mr Uribe has become a vitriolic foe of Mr Santos. He accuses the president of “handing the country over to the FARC”. That is a wild exaggeration. But there is indeed plenty to criticise in the 63-page agreement on justice finalised on December 15th. FARC leaders accused of war crimes will go before a special Peace Tribunal. Provided they confess, they will be eligible for alternative penalties that include five to eight years of “effective restriction of liberty and rights” and engaging in projects to help victims of the conflict. At their laxest, the penalties could see FARC commanders working to strengthen their own political base by, for example, helping displaced peasant farmers. And meanwhile, they will be free to take part in politics.

The agreement offers “worrying levels of impunity” for serious crimes, says Iván Duque, a senator from Mr Uribe’s party. Human Rights Watch, an advocacy group, concurs. It fears that the tribunal, whose composition has yet to be agreed, may not be independent.

Nevertheless, the agreement does hold the FARC to account. And after three years of hard talking, it is the most the government could extract from the much-weakened, but undefeated, guerrillas. The alternative is years of further conflict and the FARC’s disintegration into criminal bands. That is why the United States is supporting the peace process.