A Swiss national held hostage in Mali since January has been released by his captors, al-Qaeda in the Islamic Maghreb, a spokesman for the country's president has said.
"We can confirm that the Swiss has been freed," Seydou Cissouma told the Reuters news agency on Sunday.
Werner Greiner was captured on January 22 with three other people while attending a music festival near the Niger border.
The two women in the group were freed in April, but Edwin Dyer, a Briton, was beheaded in May.
Greiner was reportedly freed in Gao region in the country's northern desert, where dozens of people were reported killed this month in clashes between the Malian army and al-Qaeda fighters.
Switzerland's foreign ministry said that he had received medical attention and would be heading home soon.
"The Swiss foreign ministry learnt with joy that the efforts towards the liberation of the last Swiss hostage in Mali has been successful," it said in a statement.
"The last hostage has been freed in Mali. The Swiss citizen has been taken care of medically and will be repatriated to Switzerland to rest"
Swiss foreign ministry
"The last hostage has been freed in Mali. The Swiss citizen has been taken care of medically and will be repatriated to Switzerland to rest."
An official involved in negotiations with the kidnappers in northern Mali told the AFP news agency earlier this month that the Swiss national was in poor health.
"He is hardly eating at all. He is suffering a lot. We are very worried," he said.
In May, the Algerian media reported that al-Qaeda was demanding $14.21m in exchange for Greiner and Dyer.
It was not immediately clear on Sunday whether a ransom had been paid for the release of the Swiss national.
Al-Qaeda in the Islamic Maghreb emerged out of the Salafist Group for Preaching and Combat, an Algerian Islamist movement.
The group now operates across a vast stretch of the Sahel region of northern Africa.
Amadou Toumani Toure, Mali's president, announced an all-out war on the group after Dyer's execution and there has been fierce fighting in subsequent months.