Four people abducted and detained in Mali, including 75-year-old French charity worker Sophie Pétronin and ex-Malian opposition leader Soumaïla Cissé, have been released.
Ms Pétronin, who was seized in December 2016, was the last French citizen to be held hostage anywhere in the world. She has now arrived in France.
Two Italian nationals were also freed.
The release was part of a prisoner swap for more than 100 jihadists, believed to be affiliated to al-Qaeda.
The Malian presidency has not revealed how it was able to free the hostages.
Malian and international armed forces have been struggling to contain a jihadist insurgency in the north of country that first emerged in 2012.
What's the latest?
Ms Pétronin and Mr Cissé, who was abducted in March while campaigning for parliamentary elections, were taken to the capital, Bamako, in a military plane along with the two Italians, Mali's presidency announced on Thursday.
Hundreds of Mr Cissé's supporters later gathered at Bamako airport to greet the opposition leader on his arrival. Others expressed their jubilation by driving through the streets of the capital sounding their car horns.
"I am very happy to be here, for Mali, for my family," Mr Cissé said on his return, adding: "I have spent six months... in conditions that were very austere... in a state of isolation."
Authorities had been working on the hostages' release for months.
Following news of Ms Pétronin's release on Thursday, French President Emmanuel Macron said he felt "immense relief" and was "happy to know she is free".
"To the Malian authorities, thank you," he said in a tweet, adding: "The fight against terrorism in the Sahel continues."
Earlier this week, Ms Pétronin's son Sébastien Chadaud said he was weary of celebrating after earlier reports that his mother was set to be free proved to be false. "We've already lived through moments like this, for four years," he said.
The two Italian hostages released were named as Pierluigi Maccalli, a missionary priest who was kidnapped in 2018, and Nicola Chiacchio, who was believed to have been captured while travelling in the region as a tourist.
In April, the two appeared in a video together which was reportedly handed to local media outlets by an unnamed group.
Earlier on Thursday, the Malian authorities announced the release of a dozen political and military figures arrested during the coup.
In August, Malian President Ibrahim Boubacar Keïta was overthrown by a military junta and little is known of what happened to talks to secure a prisoner swap after the coup.
Who is Sophie Pétronin?
Abducted on Christmas Eve 2016 in the northern city of Gao, she was well known locally for her work helping orphans and other children suffering from malnutrition.
She had been running Swiss charity Association Aid to Gao since 2004 and was an expert in guinea-worm disease, which spread through contaminated water in northern Mali.
When Tuareg rebels, backed by Islamists, seized Gao as unrest spread in Mali in 2012, seven Algerian diplomats were abducted and the Algerian consul gave her protection until the building came under attack. She fled through a back door and was spirited out of Mali into Algeria wearing long robes.
"We crossed the desert in just one night, when normally it takes two days," she told Le Dauphiné Libéré newspaper in May 2012. "I checked the speedometer, we were going at 130km/h (80mph).
She had escaped Mali in disguise but soon returned, and was abducted in a daylight raid claimed by Mali militant group JNIM.
She has appeared in two hostage videos and at one point her son went to a local mediator who said the kidnappers were prepared to accept a ransom for her release. In one video, in June 2018, she appealed for help from Mr Macron, looking tired and gaunt.
She was suffering from cancer and malaria at the time of her abduction.
Who is Soumaïla Cissé?
Mr Cissé, who was kidnapped while campaigning for legislative elections, is a former government minister and a prominent opposition leader.
He was the main challenger to Ibrahim Boubacar Keïta in the 2013 and 2018 presidential elections - losing both times. Following the result of the 2018 vote, he complained of electoral fraud.
President Keïta was overthrown in August, in part because of a perceived failure to tackle the jihadist militants in the north of the country, and Mr Cissé's continued captivity was seen as a symptom of that.
What's behind Mali's Islamist insurgency?
A separatist rebellion in the north of the country that began in 2011 created the conditions for militant jihadists to take control of parts of the region.
In 2013, a French-led force helped seize back territory, but a network of jihadist groups remained active and they were able to carry out attacks and kidnappings.
The Malian government has not been able to regain full control of the north.
France continues to support forces in Mali and in other parts of the Sahel region in their fight against the militants.