The World Bank has approved a $500 million education loan to Tanzania after years of delays because of concerns about the country’s policy of banning pregnant students from public schools.

The World Bank froze $1.7 billion in loans to Tanzania in 2018 following both the pregnant student ban and a law making it illegal to question official statistics. It started releasing funds again to the East African country last September.

The terms of the loan, which is designed to improve secondary school access, give pregnant students – who were forced to drop out – a chance to complete their schooling through alternative public education programs, the World Bank said late on Tuesday.

President John Magufuli announced the pregnant student ban in 2017, drawing harsh criticism from activists and donors.

The World Bank, Tanzania’s biggest external lender, says about 5,500 pregnant girls drop out of school every year.

Foreign loans and grants are a key source of foreign exchange for East Africa’s third-largest economy.

Opposition leader Zitto Kabwe, who had previously asked the World Bank to withhold the loan until it was more inclusive, lauded campaigners and the terms of the loan on Twitter.

Still, some activists emphasized there was a lot more work to be done.

“I was expecting the World Bank to push for re-entry of banned teenage mothers in public schools, period,” said Carol Ndosi, a womens’ advocate. But, until then, this was a step in the right direction, Ndosi said.