Between the ages of 14 and 16, Imani, from Mwanza, Tanzania, walked more than an hour and a half every morning to reach her secondary school. She would often be punished for arriving late, but she never lost hope – holding on to her dream of graduating and becoming an accountant.

Imani’s plans fell apart after she was sexually abused by the secondary school teacher her parents had hired to tutor her, and she became pregnant.

“My dream was shattered,” she told Human Rights Watch. “I was expelled from school.” After giving birth, Imani tried to get back into school, but without success.

Last week, Tanzanian president John Magufuli made comments that will destroy the dreams of many more teenage mothers. He said adolescent girls who become pregnant will not be allowed back to school as long as he is president, because they will encourage other girls to have sex. He said teen mothers should instead take vocational training.

Magufuli also wrongfully accused non-governmental organizations that have been urging the government to allow teen mothers back in school of being used by foreign agents. Home Affairs Minister Mwagilu Nchemba has threatened to rescind the registration of groups advocating for the education of teenage mothers and for LGBT rights.

Magufuli’s comments are irresponsible and damaging. They contradict efforts by his own government to adopt a re-entry policy that will allow all girls to finish their education. Tanzanian schools expel an estimated 8,000 pregnant girls each year.

Human Rights Watch has documented the many factors that contribute to teenage pregnancies in Tanzania, including child marriagelack of information about sexuality and reproduction, and sexual violence and exploitation.

In Tanzania, almost two out of five girls marry before they reach 18, but the government has failed to adopt a law prohibiting the marriage of children under 18. The 2015-2016 Tanzania Demographic and Health Survey found that one in four girls and women aged 15 to 19 are mothers. Forty percent of women ages 15 to 49 have experienced physical violence, and almost 20 percent have experienced sexual violence.

Although there is near gender parity in first-year enrollments in Tanzania, fewer than a third of girls who complete primary school end up completing lower-secondary school, often because of many social and other obstacles, as well as the poor quality of education.

President Magufuli should stop resorting to punitive measures that denigrate, discriminate against, and force thousands of girls out of school, pushing them and their children into poverty and exclusion.

His government’s efforts would be better spent addressing many of the problems that schoolchildren, and girls in particular, face. The government should urgently adopt strong measures to end widespread sexual violence against school girls, often by school personnel, work to end child marriage, and equip all young people with adequate sexual and reproductive health information and services to make informed decisions about sex.

Magufuli should publicly retract his destructive comments, and direct his government to finalize the draft re-entry guidelines, which would allow adolescent mothers to return to school up to two years after giving birth.

When Human Rights Watch interviewed Imani in early 2016, she had just started a computer literacy program set up by a non-governmental organization in Mwanza to ensure that more young women like her can find a way back into education.

Magufuli should protect the right to education for teen mothers like Imani, and instruct officials to stop threatening organizations working to help them. The government needs to provide more education for girls, not less.