Details have emerged of a peace deal between the Colombian government and leftwing Farc guerrillas that could herald the end of the world’s longest-running war – and provide a new model for reconciling bitter enemies.

Background papers seen by the Observer in the wake of the announcement of a deal in Havana reveal complex arrangements over reparations for victims, and an offer to guerrillas to enter democratic politics or face justice.

The conflict dates back to the outbreak of civil war in 1948 – with its latest phase, between Farc and the state, igniting in 1964. The war led to the world’s highest proportional internal displacement of people.

The papers detail the deal under which each side overcame its apparently insurmountable differences over how a transitional justice process would work. Both sides said in March that this issue was the hardest to negotiate. Talks nearly broke down within a month over arrangements for trials and a reconciliation framework. Now, however, only one of six elements in the talks remains to be finalised: decommissioning and disarmament. Last week’s announcement affirms that, once the now likely final accord is signed, Farc will lay down its arms within 60 days.

The main document, entitled Special Jurisdiction for Peace, states its aims as to: “satisfy the victims’ right to justice; obtain truth for Colombian society; contribute to the reparation of the victims; contribute to the fight against impunity; and grant legal security to those who directly or indirectly participated in the armed conflict”.

Then it sets out the elusive basis for crime and punishment. Since talks began in 2012, models for a transitional justice framework included the prosecutorial approach, as implemented for the former Yugoslavia in the Hague and the Truth and Reconciliation Commission in South Africa. There were many consultations with the Irish and British sides in the Good Friday agreement, which negotiators found insufficiently responsive to victims’ needs.

The Colombians forged a groundbreaking hybrid – “probably something that has never been achieved in any peace negotiations,” said President Juan Manuel Santos. A special jurisdiction will establish a tribunal and justice chambers to investigate, prosecute and adjudicate crimes, with Colombian judges presiding, backed by a “limited participation of international experts”.

The tribunal, described in Farc’s documents as a “peace court”, will not try all cases. There will be “two types of procedure”. One will deal with those who “recognise their responsibility in an early fashion for the most serious crimes”. These people “will have access to the special justice treatment”. They will present themselves to a “comprehensive system of truth, justice, reparation and non-repetition” which will – along South African lines – accept statements of responsibility and reckoning to forge an agreed truth. In this way Farc leaders electing to co-operate will be eligible for “alternative sanctions”: supervised community work with “effective restraint of liberty” – but not jail – for between five and eight years.

Guerrilla leaders who “recognise their responsibility in a late fashion” face trial by the new tribunal and jail terms of between five and eight years. Those who “fail to recognise their responsibility and are declared guilty ... will be convicted to prison sentences of up to 20 years”.

The practicalities of this would fit within the other elements of the peace process already agreed: sweeping land reforms, curtailment of drug traffic and political participation for former guerrillas, with guarantees of protection.

Santos seems to have gained more ground from Farc than had been expected, but he has made one concession that could leave many who served under him also facing justice. The Special Jurisdiction for Peace “requires the participation of all those who directly or indirectly took part in the armed conflict, including ... state agents”.

Farc’s commander, Timoleón Jiménez, posted an interview saying: “We are willing to take responsibility for our actions during the period of resistance.”

The documents stipulated that there will be no special consideration for drug-trafficking crimes that are “unrelated to rebellion”.