France has for the first time acknowledged that its soldiers carried out a “massacre” in Senegal in which dozens – perhaps hundreds – of West African troops were killed almost exactly 80 years ago, Senegalese President Bassirou Diomaye Faye has said.

Those who died were part of the Tirailleurs Senegalais unit, recruited at the start of World War Two to help defend France, the colonial power.

On returning to Senegal in 1944 many protested about their pay, historians say, which led to a brutal response.

The killings have been a point of contention between Senegal and France and their reported acknowledgement by Paris comes as Faye is talking about a reassessment of the countries’ relationship.

Those who joined the Tirailleurs Senegalais not only came from Senegal but also from across France’s African empire, including what is now Mali, Guinea, Niger, Benin and Chad.

They were sent to France and many were captured by Germany during its successful invasion of the country. Liberated in 1944, the soldiers were taken back to Senegal and housed in the Thiaroye military camp, 15km (nine miles) from the capital, Dakar.

Even before leaving France, many had been complaining about the pay they were set to receive and the fact that it was not the same as other French troops, historian Armelle Mabon says. Anger over the money grew once at Thiaroye, which the colonial authority viewed as a mutiny.

On 1 December, the French violently brought an end to the protests. At the time it was said that 35 of the tirailleurs were killed, but some have put the death toll as high as 400.

“France must recognise that on that day, the confrontation between soldiers and riflemen who demanded their full legitimate wages be paid, triggered a chain of events that resulted in a massacre,” the AP news agency quotes a letter from French President Emmanuel Macron to Faye as saying.

Previously, in 2014, then President François Hollande had called what happened a “bloody repression”.

Senegal is due to mark the 80th anniversary of the shootings on Sunday.

In his response to Macron’s letter, Faye is quoted by AP as saying that his French counterpart’s acknowledgement would “open the door” so the “whole truth about this painful event of Thiaroye” can be discovered.

“We have long sought closure on this story and we believe that, this time, France’s commitment will be full, frank and collaborative,” he added.

He also indicated that he might be asking for an apology.

Sixty-four years after Senegal’s independence, France still has a military presence in the country, but speaking to the AFP news agency on Thursday, Faye, who was elected in March, said that France should close its base there.

“Senegal is an independent country, it is a sovereign country and sovereignty does not accept the presence of military bases in a sovereign country,” he is quoted as saying.

Additional reporting by Mamadou Faye in Dakar.