Almost a year to the day since French-Algerian writer Boualem Sansal was arrested on arrival at Algiers airport, the Algerian president has pardoned him and allowed him to leave the country.

Sansal, 81, has been at the centre of a bitter diplomatic row between Paris and Algiers and 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 and was taken to hospital.

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.