About 360 Moroccans hired by the French rail firm SNCF in the 1970s have taken their employer to a tribunal to demand the same rights as French colleagues.
They were recruited as contract workers and not given the status of official SNCF railway workers - something long reserved for French nationals.
The status, now open to all EU citizens, entails better pay and other benefits, as well as rail travel perks.
The SNCF says the status is a regulation decided by the French state.
French railway trade union Sud Rail, which is backing the Moroccans at the Paris industrial tribunal, said the status issue was a "form of direct discrimination".
"We had talks with the SNCF about the abolition of the nationality clause but they did not get anywhere," said Sud Rail representative Bouabdellah Frahlia.
The Parisian bus and metro company RATP, he noted, did away with a similar nationality clause in 2002.
'Aligned with the French'
French news agency AFP notes that certain public sector jobs in France are not open to foreigners from outside the EU.
Some of the Moroccans involved in the dispute are now retired and spoke earlier this year to French newspaper Liberation, which headlined its article "Second-class pensioners at the SNCF".
One of them, Lainouni, showed his contract on which was written: "Salary and working conditions aligned with the French worker."
A lawyer calculated damages of between 300,000 (£250,000, $400,000) and 400,000 euros for each worker.
But according to the Liberation report in March, the Moroccans were finding little support among French colleagues.