Almost a year to the day since French-Algerian writer Boualem Sansal was arrested on arrival at Algiers airport, the Algerian presidency has granted him a pardon and allowed him to leave the country.
Sansal, 81, has been at the center of a bitter diplomatic row between Paris and Algiers. President Abdelmadjid Tebboune's decision came in response to a direct approach from German President Frank-Walter Steinmeier.
The writer arrived in Germany on a military plane on Wednesday evening.
French President Emmanuel Macron, who spoke to Sansal by phone, said France had used respect and calm to bring about his freedom.
"I thank President Tebboune for this act of humanity," said Macron.
Even though Paris had for months sought to lower tensions with Algeria, it was the German president's role that secured Sansal's release as of his good relations with Algeria's leader.
Élysée Palace sources told French media that Frank-Walter Steinmeier had acted as a "trusted third party" rather than just a mediator.
Steinmeier said this week he had the ascension of President"given his advanced age and fragile health", so the writer could receive medical treatment in Germany.
Tebboune said on Wednesday he had decided to respond favourably to Steinmeier's request "as of its nature and humanitarian motives".
Sansal is being treated for prostate cancer.
He was given a five-year jail sentence in July for undermining national unity with remarks that questioned Algeria's borders.
The novelist has long been a critic of the Algerian government.
Boualem Sansal is a highly acclaimed french-Algerian novelist known for