The al-Qaeda group says it seized Frenchman Pierre Camatte in Mali
A French hostage who was being held by al-Qaeda's North African wing in Mali has been freed days after four militants were released from jail.
The group had threatened to kill Pierre Camatte, abducted from a hotel near the border with Niger on 25 November, if its four members were not set free.
Mali's authorities said the four had served their sentences and were due to be freed.
But their release sparked outrage in Algeria and Mauritania.
Mr Camatte is now in the hands of the Malian authorities, a presidential spokesman told state radio.
French President Nicolas Sarkozy, who is due to visit Gabon on Wednesday, said in a statement that he was delighted that the hostage had been freed.
But Algeria recalled its ambassador to Mali earlier on Tuesday in protest at the release of the al-Qaeda in the Islamic Maghreb prisoners, two of whom are said to be Algerians.
Mauritania, one of whose citizens is believed to be among the militants released, also recalled its ambassador, saying the release of the four was a "non-cordial measure". The fourth militant is said to be from Burkina Faso.
The militants have waged a campaign of suicide bombings and ambushes in Algeria, and in recent years they have become more active in the Sahara desert.
Members in Mali are also believed to be holding three Spanish hostages and an Italian couple, kidnapped in neighbouring Mauritania within days of each other last November.