(CNN)A regional West Africa court ordered the Sierra Leone government to lift a policy barring pregnant students from attending school.
The Economic Community of West African States (ECOWAS) court on Thursday also urged the government to abolish part-time schools for pregnant schoolgirls which rights campaigners say is "discriminatory."
In 2015, the Sierra Leone government adopted a policy barring pregnant girls from mainstream schools following an increase in teenage pregnancy rates linked to closure schools during the Ebola crisis, according to Equality Now, one of the advocacy groups, which brought the case before the court in 2018.
Specialized centers were set up for pregnant students, according to the rights group.
"A girl cannot get pregnant on her own in the first instance. Also, many of these girls come from poor families, and once they lose a year, they will not return to school,"Judy Gitau from Equality Now told CNN.
Amnesty International described the judgment as a "landmark moment" for thousands of girls who were denied inclusive education because of the ban.
Marta Colomer, Amnesty International West and Central Africa Acting Deputy Director Campaigns hopes that the ruling would push other African countries with similar bans to reverse it.
"This also delivers a clear message to other African governments who have similar bans, such as Tanzania and Equatorial Guinea, or may be contemplating them, that they should follow this ground-breaking ruling and take steps to allow pregnant girls access to education in line with their own human rights obligations," Colomer said.