The European Union’s highest court has decided that obesity can constitute a disability in certain cases in a binding ruling issued on Thursday. The European Court of Justice had been asked to consider the case of a man in Denmark who claimed he had been fired from his job for being overweight, according to the Guardian

“While no general principle of EU law prohibits, in itself, discrimination on grounds of obesity, that condition falls within the concept of ‘disability’ where, under particular conditions, it hinders the full and effective participation of the person concerned in professional life on an equal basis with other workers,” the court said in its decision.

Karsten Kaltoft, who weighs about 350 pounds, had brought a discrimination case against his employers of 15 years after he was fired from his job as a nanny in 2010, the BBC reported. Kaltoft claimed that he was dismissed for being overweight though his employer, the Billund City Council in Denmark, denied that weight played a role in his firing. The Danish courts then referred the case to the ECJ in order to clarify whether obesity could be considered a disability.

Kaltoft maintained that his weight hadn't impacted his work with children, saying "I don't see myself as disabled. It's not OK just to fire a person because they're fat, if they're doing their job properly," in comments to the BBC.

As significant as the ruling may be, it stops short of declaring obesity a protected characteristic against which all discrimination is banned, the Guardian reported. Instead, it allows for the effects of obesity to be considered a disability. "As such, workers who suffer from, for example, joint problems, depression, or diabetes ­ specifically because of their size ­ will be protected by the European Equal Treatment Framework Directive and cannot be dismissed because of their weight," Paul Callaghan, the head of employment law at an international law firm, told the BBC.

The ruling is binding across the EU, however, national courts will have the discretion to decide whether a person’s obesity is severe enough to be considered a disability.