Armed groups from northern Mali will be in a "position of strength" when they begin peace talks with the Bamako government in Algiers on Wednesday, an Algerian diplomat said.

"After the major defeat of the Malian army," which lost around 50 soldiers in the Tuareg region of Kidal in May, "the armed movements now occupy nearly two-thirds of the country… and come to Algiers in a position of strength," the diplomat told journalists.

He was speaking on the eve of the talks between Malian government negotiators and rebel groups aimed at striking an elusive peace deal, with the country mired in conflict a year after returning to democracy.

The Algiers meeting brings together the various warring factions for the first time since an interim agreement in June 2013 paved the way for nationwide elections.

The diplomat, speaking on condition of anonymity, described the room for manoeuvre in the negotiations as "tight".

He said the parties needed to reach a power-sharing consensus between, "on the one hand, armed groups who want autonomy for northern Mali … (and on the other) a government open to any idea except independence."

The negotiations will take place in three phases, according to former prime minister Modibo Keita, the president's envoy at the talks.

The different sides will begin by thrashing out a "roadmap" for the negotiations, before beginning the talks themselves and finally signing a "final peace agreement", Keita said.

Since President Ibrahim Boubacar Keita came to power last year negotiations have stalled, and northern Mali has seen a spike in violence by Islamist and separatist militants.

But earlier on Tuesday, Tuareg rebels and the Malian government exchanged dozens of prisoners in a goodwill gesture ahead of the peace talks.

Forty-five Malian soldiers and police captured during clashes at the end of May in the west African nation's restive northeast arrived at Bamako's airport.

They were replaced on the plane by 41 militants captured during patrols of the north by security forces, with the rebels due to be to returned to their homeland, known by the Tuareg as "Azawad".

The Algerian diplomat claimed Mali's president believed Algeria could break the deadlock, which he said had lasted for 10 months.

Mali is "one of the 10 least developed countries in the world … and does not have the means" to survey its vast territory bordering southern Algeria, he added.

burs/sma/kir