An HIV-positive Kenyan waitress who was sacked from her job has been awarded £17,000 in a landmark ruling against her employer and her doctor.

The woman, known only as JAO to protect her identity, claimed that she had been dismissed after her doctor told her former employer, Home Park Caterers, of her medical status. After a five-year battle for compensation, the Nairobi high court said that it was illegal to end a person's employment because they were HIV positive - the first time such a ruling has been made in Kenya.

Local Aids activists, who are still trying to remove the stigma attached to the disease, welcomed the judgment. "This decision is going to go a long way to making employers more cautious when they sack someone," said James Kamau, of the Kenya Treatment Access Network.

JAO, 45, whose husband died of Aids, worked for Home Park for eight years before she was dismissed in 2002. She told the court that she had initially gone to the Metropolitan hospital to seek treatment for rashes and chest pains.

When she returned a week later Dr Primus Ochieng tested her for HIV - without her consent, she said - and passed the results on to her employer in breach of doctor-patient confidentiality. Home Park, denied knowing that she was HIV positive, but JAO's termination letter showed that she had been sacked on medical grounds. The company was ordered to pay her £5,650 in compensation.

The Metropolitan hospital and Ochieng, who denied handing over the medical records to Home Park, must pay £11,350. The court ruled that it was unlawful for a company to test a staff member for HIV without their consent. It was also unlawful for a doctor to disclose a patient's medical status to an employer, the court said.