In a landmark ruling, Kenya’s High Court has declared that young people should no longer face criminal prosecution for consensual under-age sexual relationships, a decision rights groups are calling a major victory for adolescent rights.

The ruling came Wednesday after a case brought by the Centre for Reproductive Rights on behalf of three Kenyan teenagers. One of them, a 17-year-old boy, was arrested after police found him living with his 16-year-old partner and charged him with defilement.

Another teenage couple faced years of legal battles after becoming pregnant while under-age.

Kenyan law currently prescribes up to 15 years in prison for sex with minors aged between 16 and 18. But the court ruled that authorities must now distinguish between abusive relationships and consensual relationships involving teenagers.

Judges also ordered the government to improve access to sexual and reproductive health education and services without fear of criminalisation.