In this judgment, absolutely crucial for Kenya’s women and girls, three stories collide.

The first is the story of Kenya’s constitution and what it says about abortion: “Abortion is not permitted unless, in the opinion of a trained health professional, there is need for emergency treatment, or the life or health of the mother is in danger ….”

The second is the story of far-reaching action by the country’s director of medical services (DMS): in 2013 and 2014 he withdrew official guidelines on reducing deaths from unsafe abortions, as well as the training curriculum for health professionals on how to manage abortion and aftercare from illegal abortions. Anyone attending the training or using the drug that induced early abortion would be disciplined, he warned.

The third, utterly tragic, story follows directly from the withdrawal of the training guidelines. Raped when she was 14, a girl named only as JMM discovered she was pregnant but, fearing rejection, told only an older friend. This friend introduced her to a “doctor” who twice tried to induce an abortion. Vomiting and bleeding heavily, JMM was taken from one health institution to another but the help she received was inadequate and ineffective and left her needing dialysis because of the chronic kidney disease she developed as a result of serious blood loss.

With the support of a number of organisations, her mother brought an application for the action by the DMS in withdrawing guidelines for training on abortion and post-abortion treatment to be declared unconstitutional.

Before the matter was finalized, however, JMM died from the damage done by the illegal abortion and the delay in getting effective help.

The application, fiercely contested by anti-abortion groups, required the five judges to decide the meaning of the constitutional provision on abortion. Did it mean, as opponents of the petition claimed, that abortion was almost never permitted – only in “the rarest of cases” when the mother’s life was in extreme danger? Did it mean, as they also claimed, that it was not available for pregnancy merely because it resulted from rape?

The judges said the constitution clearly said that abortion was not lawful, but provided for exceptions to this rule.

Abortion in Kenya reflected the reality that there was a high incidence of sexual violence against poor women and girls. JMM was such a child, and her “ordeal” presented “a classic case of a failed health care system lacking in both skilled staff, facilities and a proper referral system.”

Her situation showed the dire need for training in the skills and knowledge needed to address the rate of deaths following unsafe abortions.

But when the constitution permitted abortion where the “life and health” of the mother was at stake, what did “health” mean? Both Kenya’s Health Act and the World Health Organisation spoke of health in terms of physical, mental and social well-being “and not merely the absence of disease”.

In the view of the court, the constitution therefore permitted abortion where a pregnancy “in the opinion of a trained health professional”, endangered the “life or mental or psychological or physical health of the mother”. The judges also held that in this context a “trained health professional” did not mean only doctors: the Health Act also included nurses, midwives and clinical officers with training to manage pregnancy-related complications in the definition of that phrase.

From these and other findings, the judges said that in their view, “women and girls in Kenya who find themselves pregnant as a result of sexual violence have a right, under Kenyan law, to have an abortion performed by a trained health professional (who) forms the opinion that the life or health of the mother is in danger. Health, in our view, encompasses both physical and mental health.”

They added, “there can be no dispute that sexual violence exacts a major and unacceptable toll on the mental health of women and girls. Whether the violence occurs in the home or in situations of conflict, women suffer unspeakable torment as a result of such violence.”

And what about the withdrawal of the standards and guidelines by the DMS?

The guidelines were clearly “public policy documents”, and though they were drawn up through a public participatory process as required by the constitution, they were withdrawn without any similar process in an action amounting to the arbitrary exercise of power.

Was the withdrawal of the standards and guidelines and the training curriculum lawful, given the constitutional provisions on health including reproductive health care, and given that their withdrawal clearly left women and girls “to the vagaries of medical quacks and backstreet services”? In the view of the judges, the arbitrary withdrawal limited a constitutional right and was “unreasonable, drastic and unjustifiable in a democratic society”.

The judges summarised their findings. The general rule was that abortion was illegal. However, it was permissible in the circumstances described by the constitution. On the question of rape in particular, where pregnancy resulted from rape and, in the opinion of a trained health professional, endangered the physical, mental and social well-being of the woman or girl, then abortion was permissible.

The withdrawal of the guidelines and training curriculum by the DMS effectively nullified these rights and created a situation where survivors of sexual violence “cannot access safe quality services despite the clear constitutional provisions.”

JMM was “clearly entitled to emergency treatment” including post-abortion care. As a result of the woeful inadequacies in the care available at the facilities where she tried to get help, “comprehensive reparation” was due for the harm suffered as a result of the government’s actions and omissions.

Such arbitrary behaviour needed to be curbed, the judges said, particularly when there was no explanation for the poor treatment JMM received from the state hospitals and clinics. The government was thus “fully liable” for damages she suffered, and the court awarded Kshs. 3,000,000

This is a hugely significant decision, and one that shows the court using constitutional interpretation to grapple with some of the more conservative aspects of Kenyan law and society. In my view, however, it is most disappointing that the (differently constituted) court hearing last month’s application to de-criminalise gay sexual relations did not show the same empathy to the applicants, let alone a similar bold spirit in its constitutional interpretation.