By Mark Doyle
BBC World Affairs Correspondent
One of west Africa's longest-running insurgencies, in southern Senegal, appears to be drawing to a close.
A violent pro-independence movement that began in 1982 in the southern Casamance region has been gradually diminishing in strength and for the past two years there has been relative calm.
The Senegalese army was accused of being heavy-handed
A new study published by the UK-based think tank, the Royal Institute of International Affairs (RIIA), said the current calm in Casamance presents "the most favourable opportunity yet for peace".
Later this month the Senegalese President, Abdoulaye Wade, may travel to the Casamance regional capital Ziguinchor to sign a peace deal with the political leader of the rebels, Father Diamacoune Senghor.
But this ceremony probably will not mean the final end of the troubles. It is unclear exactly which of the factions of the armed wing of the rebels support Father Diamacoune, and there have been broken deals in the past.
But ordinary Senegalese who have suffered from the conflict for many years are hoping it could be the beginning of the end.
Northern Ireland parallels
The violence in the Casamance region has rarely received much publicity.
The region has seen more calm in the last two years
But it is estimated that roughly the same number of people have been killed in the conflict - around 3,500 - as have died in the unrest in Northern Ireland.
The author of the new report, Martin Evans, says there are other comparisons that can be drawn with the Northern Ireland situation.
Parallels include the ethno-regional dimension, the way in which initially peaceful protest was radicalised by a heavy-handed government response and the use of a neighbouring country's territory for rear bases and arms supply.
He also highlights the similarities of the degeneration of a political struggle into gangsterism and the question of decommissioning weapons.
The Casamance region is, by a quirk of colonial history, separated from the rest of Senegal by the territory of the former British colony of The Gambia.
It was partly this geography which encouraged some ethnic Jola people, who form the majority in Casamance, to rebel. They claimed they were marginalised by ethnic Wolofs, who are the most populous single ethnic group in Senegal.
Yet while the rebellion rumbled on, marked by atrocities against civilians by both sides, it became clear not all Jola, or indeed other ethnic groups that lived in Casamance, supported the armed fighters known locally as "maquisards".
Politics in Senegal is in any case driven by many factors other than ethnicity.
The RIIA study argues that several factors have worked recently against the interests of the Casamance Movement for Democratic Forces (MFDC), most notably the death in a civil war in neighbouring Guinea-Bissau of the Bissau-Guinean army leader, Ansumane Mane.
The Guinea-Bissau army was the main source of weapons and ammunition for the MFDC. Mane's death allowed the then-President of Guinea-Bissau, Koumba Yala, to align himself more closely with the Senegalese government and limit the military supplies.
Mane was an ethnic Mandingo who did not have direct tribal links with the Jolas who made up the MFDC. It may be that his motivation in helping the rebels was simply to expand the influence of the Bissau-Guinean army.
The supply of arms to the Senegalese rebels was also in part an historical quid pro quo for the unofficial support the people of Casamance gave in the 1960s and 1970s to Bissau-Guinean rebels in their successful fight against the Portuguese colonial regime in Bissau.
The Senegalese government never officially allowed military rear bases for the anti-colonial Guinea Bissau fighters, who went on to occupy influential positions after independence.
But many of them retreated into Casamance when it suited them. The Portuguese certainly suspected collaboration - at one point the colonial regime bombed suspected bases in southern Senegal.
Mr Evans argues that the Casamance rebels' aim of independence was a long way from being attainable. Casamance is a fertile area but it does not have high-value minerals or other resources that could sustain a state structure.
The rebels were also fragmented into rival factions and did not present a united front.
Another factor was that, while the Senegalese army may have prompted some of the unrest by its early heavy-handed suppression of demonstrations in the 1980s, the government in Dakar is a democratically elected one that has wide international support.
Dakar never considered the independence claims to be valid, and was broadly backed by powerful allies such as former colonial power France in this regard.
Many ordinary Casamancais civilians are now hoping that peace may be returning to their homeland at last.
But the fragmentation of the independence movement means there are bound to be disgruntled, armed men around the area for some time to come.