The European Court of Justice had been asked by a Danish court to consider the case of a child minder in Denmark who said he was fired four years ago because he is obese.
The employee, Karsten Kaltoft, filed a suit to obtain damages and interest from the municipality of Billund which employed him in the job, claiming he was the victim of discrimination.
"I'm both glad and relieved that there has been a ruling that... Clearly points in our direction," Kaltoft, who lost his job in 2010 and is now working as a lorry driver, told AFP.
Those who claimed it would make employers more reluctant to hire overweight people were wrong, he said.
Also Read
"If you have the qualities and qualifications an employer needs, I don't think they -- when they are hiring you -- look at how easy you are to fire," he said.
The Danish court asked the Luxembourg court whether EU law itself prohibits discrimination on grounds of obesity and whether obesity can be considered a disability.
The EU court ruled that "no general principle of EU law prohibits, in itself, the discrimination on grounds of obesity".
The EU court said however it was up to the Danish court to "determine whether Kaltoft's obesity falls within the definition of disability".
Danish trade union FOA, which was acting on behalf of Kaltoft, described the ruling as "a great victory".
The town of Billund "has said all along that Karsten Kaltoft's obesity could never constitute a disability because it was self-inflicted. The European Court of Justice flatly rejects this argument," the union said in a statement.