Tanzania's highest court has upheld a landmark 2016 ruling that raised the minimum age of marriage to 18.

The Supreme Court of Appeals' decision, announced Wednesday, was greeted by child welfare and women's advocates as a win.

"This was a victory not only for girl children but also for Tanzanians in general," said Ann Sangai of the Tanzania Gender Networking Program (TGNP), which advocates for girls and women's rights.

A legal challenge led Tanzania's high court to strike down two sections of the country's marriage law in 2016, effectively raising a girl's minimum marriageable age to 18 from as young as 14. But the Eastern African country's attorney general appealed the decision last year on the grounds that the lower minimum age actually protected girls who became pregnant out of wedlock.

Human rights analysts say the court's decision to uphold the law benefits millions of youths, especially those in traditional communities or rural, disadvantaged areas who are most vulnerable to early marriage.

The Tanzanian advocacy group Msichana Initiative led the effort to raise the minimum age to 18. One of its lawyers, Alex Mngongolwa, told VOA that permitting marriage at an earlier age contravened the country's constitution and disrespected international conventions ratified by Tanzania's Parliament.

A growing body of research indicates that early marriage — sometimes prompted by pregnancy — disrupts a girl's education, limiting prospects not only for her but also for her family and community.

This report originated in VOA's Swahili Service.