By Aidan Lewis
BBC News website
It is Mr Sarkozy's third visit to Algiers in just over a year
As French President Nicolas Sarkozy prepared for his visit to Algeria this week, it seemed that a new diplomatic row was brewing.
But the spat was rapidly brushed aside.
It was a typical episode in the stormy relationship between Algeria and France, and a reminder that economic ties remain paramount despite a painful shared history.
As the visit neared, Algerian officials had raised an old demand that France apologise for "crimes" during its rule of what was once its most treasured colony.
One of the officials, War Veterans Minister Mohamed Cherif Abbas, had also told a newspaper that Mr Sarkozy owed his election to the "Jewish lobby" - a comment that drew angry reactions in France.
Algerian President Abdelaziz Bouteflika quickly distanced himself from the comments.
The two leaders spoke on the phone, with Mr Bouteflika telling his French counterpart that the minister's comments "do not at all reflect Algeria's position".
"The French president will be received as a friend during his state visit, a visit which is vital for both countries," Mr Bouteflika said, according to a statement issued jointly by both governments.
Mr Sarkozy has said he considers the incident closed.
But it was a good illustration of the fractious, love-hate bond between the two countries: troubled, but propped up by deep, enduring ties.
Frantic diplomatic activity ahead of Mr Sarkozy's trip "shows the interest of this visit for both parties," Omar Berbiche wrote in the Algerian newspaper El Watan.
"But it is also the clear sign of serious disagreements that remain... and which we hope to remove or at least address with a new vision of the future - one that does nothing to disavow the common past," he wrote.
The basis of those disagreements is French rule in Algeria, which began in 1830 and ended in 1962 after a bitter, eight-year independence war during which hundreds of thousands of Algerians died.
Up to a million French settlers fled the country abruptly as the conflict came to a close.
Thousands of those settlers have recently returned to Algeria for the first time since this exodus, most in a spirit of reconciliation.
But on a political level, relations have been more turbulent.
Two years ago the French parliament passed a law that said school textbooks should refer to the "positive role of the French presence overseas, especially in North Africa".
The offending clause was later removed, but reaction in Algiers was furious and a planned friendship treaty between the two countries was shelved.
When Mr Sarkozy replaced Jacques Chirac, there was hope that the younger leader could overcome the impasse.
The French president, perhaps conscious of the view of right-wing voters in France, has said that he is not planning to apologise for the colonial past.
But relations with Algeria are clearly a priority.
This is the third time Mr Sarkozy has visited Algiers in just over a year, and the second since his election in May.
Hundreds of thousands died in the Algerian war of independence
Economic ties, in particular, have remained solid.
Algeria is still France's top African trading partner, and Mr Sarkozy is expected to sign or commit to deals worth up to $4bn (£2bn) during his trip.
Security and immigration are other areas in which France is keen to work more closely with its former colony.
As Algeria slowly tries to open up its economy, the French face increasing competition from countries including the US, Russia and China.
But Jean-Pierre Tuquoi, a long-time North Africa correspondent for French newspaper Le Monde, says that even though these countries are winning contracts to exploit Algeria's abundant oil and gas, France is likely to retain a privileged place in other trade.
"There are hundreds of companies, especially in southern France, who live to a large extent from their dealings with Algeria," he told the BBC News website.
"There's a proximity in language, business, and culture.
"Despite the political arguments, ties will remain strong."