Tanzania President John Magufuli has said girls will not be allowed back to school after giving birth during his administration.
He accused civil society organisations, which have been urging the government to permit teen mothers to re-enter the education system, of being used by foreign agents.
The president was addressing residents of Bagamoyo during a three-day tour of the Coast region.
"There are many things that the girls can do after delivery; they can join VETA (Vocational Education Training Authority centres) and learn sewing and farming," he said.
He argued that if they are permitted to resume studies, they would encourage other schoolgirls to engage in sex.
"If we were to allow the girls back to school, one day we would find all girls in Standard One going home to nurse their babies.”
Of the man responsible for the pregnancy, Magufuli said he should be imprisoned for 30 years and put the energy he used to impregnate the girl into farming while in prison.
"After getting pregnant, you are done!” the president said to a round of applause.
Pressure for the government to allow teen mothers be readmitted in schools has been mounting, with rights groups calling for the formulation of legal framework that would allow schoolgirls resume studies after giving birth.
A parliamentary committee as well as Opposition MPs have joined in the calls.
A report by Human Rights Watch says about 8,000 girls who drop out of school every year due to pregnancy.
President Magufuli said the foreign human rights groups should open schools for the teen mothers instead of trying to force the government's hand.
He also condemned the activists for advocating for same sex relationships calling on Tanzanians to be watchful.
"It's ignorant and foolish," he said adding that they are " introducing behaviours that even cows and goats cannot condone."