The case was referred to the European Court of Justice in 2006
A British woman has won the initial stages of a landmark legal case at the European Court of Justice which could give new rights to millions of carers.
The Advocate-General agreed that Sharon Coleman suffered "discrimination by association".
The legal secretary claimed her former London employers Attridge Law described her as "lazy" for wanting time off to care for her disabled son.
A panel of European judges will make a final ruling later this year.
Ms Coleman says she was forced to leave her job in March 2005 because she was not allowed as much flexibility in her work as parents of other children.
Speaking after the ruling she said: "I am delighted that we are one step nearer to stopping people with caring responsibilities like me from being badly treated and harassed at work.
"It has taken a lot of courage to fight this case, but no-one should have to choose between caring for disabled relatives or their job."
If her case is upheld by the full court, the verdict would effectively give new rights to millions of carers.
Making the ruling this week Poiares Maduro, a senior European lawyer, said that in his opinion a European law establishing equal treatment at work was relevant to those "closely associated with a disabled person".
He said that directly targeting a person with a particular characteristic was not the only way of discriminating against him or her.
He said: "One way of undermining the dignity and autonomy of people... is to target not them, but third persons who are closely associated with them.
"A robust conception of equality entails that these subtler forms of discrimination should also be caught by anti-discrimination legislation."
Ms Coleman was already working with the law firm when she gave birth to a disabled son in 2002.
He suffers from serious respiratory problems, including apnoeic attacks - an involuntary halt to breathing.
As primary carer, Ms Coleman wanted flexible working arrangements, but accepted voluntary redundancy and began a claim for constructive dismissal five months later.
Ms Coleman said her manager had commented that her child was always sick, and had accused her of trying to use his condition to get out of work.
She said: "They knew about my son's problems because I took him into the office, but they wouldn't allow me to work flexibly to make it easier to look after him.
"Other members of staff were taking time off for hospital appointments or worked from home but my requests were always turned down."
HAVE YOUR SAY
To wish to continue to work and look after a disabled family member is commendable
An employment tribunal hearing the case decided to refer it to the European Court for a ruling on whether EU discrimination laws covering the disabled can also apply to people not themselves disabled, but closely associated with a disabled person.
Imelda Redmond, chief executive of campaign group Carers UK, said the ruling represented a "positive step towards true equality for carers".
She said that of the 2.5m carers currently in the UK, one in five would give up work in order to carry out their role as carer.
Ms Redmond said: "Every employer will have to look at their recruitment and employment practices and make sure they are not discriminating against carers."
The group wants the government's new national carers strategy to recommend including carers in new equalities legislation, which will be introduced next year.