The main group of Tuareg ex-rebels in Mali has agreed to help the army tackle al-Qaeda's North African branch.
Both groups roam across the Sahara Desert and correspondents say the deal could prove significant.
The agreement was brokered by Algeria's ambassador to Mali. Algeria is where al-Qaeda in the Islamic Maghreb stages most of its attacks.
Last month, the group killed a British hostage who was being held in Mali after being seized in Niger.
Two weeks later, after the president declared an all-out war on the group, the army said it had seized an al-Qaeda base near the border with Algeria.
However, the group remains active in the region and has also staged attacks in Niger and Mauritania.
The BBC's Martin Vogl in Mali's capital Bamako says the Malian and Algerian governments will both be pleased to have Tuareg forces as part of their offensive against al-Qaeda in the Islamic Maghreb.
The Tuareg know how to operate in the desert perhaps better than anyone else and could be the government's best hope of beating al-Qaeda in the region, he says.
Under the deal, special units of fighters from the Alliance for Democracy and Change (ADC) are to be sent to the desert to tackle al-Qaeda.
Although the ADC signed a deal to end its rebellion three years ago, one of its factions is still active.
The Tuareg, a historically nomadic people living in the Sahara and Sahel regions of North Africa, have had militant groups in Mali and Niger engaged in sporadic armed struggles for several decades.
They have argued that their region has been ignored by the government in the south of the countries.
But there has been a history of animosity between the Tuareg groups and al-Qaeda.
Meanwhile, Mali, Algeria and Libya have reportedly agreed to work more closely against the group.
Mali's President Amadou Toumani Toure said he had agreed to share information and military resources with his two counterparts.
Correspondents say the US is giving substantial economic and military support to countries of the region which promise to tackle al-Qaeda.