Quinta Layin Tuleh, an HIV-positive woman from Cameroon charged with possession of false immigration documents in Maine, will give birth in prison because U.S. District Judge John Woodcock mandated a sentence that coincides with her due date, the Bangor Daily News reports. Woodcock said the sentence—extended to 238 days from 114—would make certain the infant, due August 29, has an opportunity to be born HIV negative.

The judge also made it clear that the extended prison time was not to punish Tuleh, 28, but to protect her unborn child from contracting HIV. The judge believes the defendant is more likely to receive medical treatment and follow a preventative antiretroviral drug regimen in the federal prison than outside of prison where she would be in the custody of immigration officials.

Zachary Heiden, legal director for the Maine Civil Liberties Union, opposes the verdict. “Judges cannot lock a woman up simply because she is sick and pregnant,” Heiden said. “Judges have enormous discretion in imposing sentences, and that is appropriate. But jailing someone is punishment—it is depriving them of liberty. The deprivation has to be justified, and illness or pregnancy is not justification for imprisonment.”

Tuleh was unaware of her pregnancy and HIV status when she was arrested, according to her attorney, Matthew Erickson of Brewer. She plans to apply for asylum in the United States after completing her sentence.