In the 60 years since Algeria won independence from France, it has gone through multiple crises with its former occupier, often fuelled by domestic politics.
Yet the two sides had surprisingly good relations for the first four decades, and it was only in the 1990s that things started to fall apart, experts say.
"Generally, despite appearances and criticism, there has been a stable, very balanced relationship," said Luis Martinez, a Maghreb researcher at Sciences Po university in Paris.
That is despite the devastation caused by the eight-year war of independence that finally led to the signing of the Evian accords on March 18, 1962, ending the conflict.
French historians say half a million civilians and combatants died -- 400,000 of them Algerian -- while the Algerian authorities insist 1.5 million were killed.
Under French General Charles de Gaulle, whose administration signed the accords, and his successor Georges Pompidou, Paris had good relations with Algiers.
The same was true of the administration of Francois Mitterrand, even though he had been interior minister when Algeria's armed independence struggle began in 1954 and remained opposed to the country's independence.
"Mitterrand was surrounded by Socialist Party people, who were all pro-FLN," said historian Pierre Vermeren, referring to the National Liberation Front, which led the revolt and has dominated Algerian politics ever since.
"(Mitterrand) was able to take a back seat" and let others deal with Algeria, said Vermeren, a professor at the Sorbonne University.
France was allowed to continue its nuclear tests in the Algerian Sahara until 1967, and de Gaulle managed to negotiate a secret deal with the new Algerian state to allow for chemical weapons tests until 1978.
But in 1992, Paris raised hackles by criticising Algiers for suspending elections, in which Islamist parties had won the first round.
Algeria withdrew its ambassador in response.
The polls' cancellation sparked another decade of devastating conflict in the North African country, until Abdelaziz Bouteflika, who rose to the presidency in 1999, offered an amnesty that paved the way for peace.
Despite being close to France, Bouteflika made use of anti-French discourse, primarily for domestic consumption, Vermeren said. "To win back control of the ideological and political sphere after the civil war, (the Algerian leadership) 'forgot' that France had helped them fight the Islamists," he said.
"They went back to their traditional enemy."
Under Bouteflika, Algerian leaders used ever-stronger language, accusing France of "genocide" during its more than 130-year occupation of Algeria.
Then, in 2019, a vast protest movement toppled the autocratic leader after two decades in power -- but the new regime has kept up the anti-French discourse.
Observers say however that cooperation behind closed doors has been surprisingly close.
In 2013, Algeria allowed French forces to use its airspace to reach Mali, where they were battling jihadists.
"French-Algerian relations are good when they're in secret. They're more hostile when they're in public," said Naoufel Brahimi El Mili, who has written a book on 60 years of "secret stories" between the two countries.
When Emmanuel Macron became president, he had good relations with Algeria.
Visiting Algiers during his campaign in February 2017, he described colonisation as a "crime against humanity".
After his election, he made gestures aimed at healing past wounds on both sides of the Mediterranean.
But he refused to apologise for colonialism, a highly sensitive topic in France, which for decades saw Algeria as an integral part of French territory and where far-right discourse has been escalating.
Comments reported last October dampened hopes around reconciliation.
Macron accused Algeria's "political-military system" of rewriting history and fomenting "hatred towards France".
In remarks to descendants of independence fighters, reported by Le Monde, he also questioned whether Algeria had existed as a nation before the French invasion in the 1800s.
Once again, Algeria withdrew its ambassador.
Now, weeks ahead of the French presidential election in April, relations appear to be looking up again.
Millions of French citizens of Algerian origin and descendants of Europeans who left after independence are among those casting votes.
"Algeria will vote for Macron," said author El Mili. "Algerians are convinced that a Macron II will be bolder."
Xavier Driencourt, a former French ambassador to Algeria, shared that view.
"They don't want (candidate) Valerie Pecresse who has a fairly right-wing tone, and definitely not (Eric) Zemmour or Marine Le Pen," he said, referring to conservative Pecresse and two far-right presidential hopefuls.
But much remains to be done. In recent years Algeria has diversified its international ties, with China becoming its main trade partner.
Martinez from Sciences Po said Macron's comments had done a lot of damage.
"They'll go back to the drawing board, and try to see what they can agree on," he said.
Former envoy Driencourt said "it takes two sides to have a relationship".
Would Algeria be interested after the election?
"I'm not very optimistic," he said.
© Agence France-Presse