A Trump administration appointee who blocked an undocumented, pregnant teenager from obtaining an abortion before the courts weighed in in her favor, has a history of controversial statements about contraception and abortion.

Scott Lloyd, the current director of the Office of Refugee Resettlement (ORR), suggested in multiple opinion articles that women receiving contraception through federal funding should have to sign a “pledge” promising not to have an abortion and that the Supreme Court’s rulings on abortion infringe on men’s “right to procreation.”

Lloyd’s early writings on the subject of abortion shed light on his decision to decline to give permission to a government-funded shelter to release a pregnant, undocumented 17-year-old to get an abortion. That decision became the subject of a federal lawsuit brought by the Jane Doe at the center of the case and the American Civil Liberties Union. (Doe was ultimately successful.)

“I suggest that the American people make a deal with women: So long as you are using the condom, pill or patch I am providing with my money, you are going to promise not to have an abortion if the contraception fails, which it often does,” Lloyd wrote in an article for the National Catholic Register in 2009.

“We can do this by having the woman sign a pledge,” he continued. “If they go on to have an abortion, they become ineligible for more taxpayer-bought contraception. They would have to buy it themselves or turn to private sources of funding for the contraception. Or, they could stop having sex until they are ready to have a child.”

In this article, titled “Bailing Out Abortionists?”, Lloyd suggests that much of the Title X family planning fund, which provides free or inexpensive contraception and reproductive care to low-income women, would increase abortion rates. At the time of the op-ed, Democrats in Congress were pushing to increase Title X funding, arguing that access to contraception decreases abortion rates.

Lloyd argues that the increased budget would go toward buying “truckloads of condoms” to distribute for free. Many of those condoms would fail, he argues, causing unplanned pregnancies and abortions, therefore, “bailing out” abortion providers. Following that logic, he went on to compare places like Planned Parenthood that distribute free contraception and perform abortions, to those on Wall Street who caused the 2008 financial crisis.

In fact, Title X funding is used for many different kinds of more effective contraception, such as the Pill, IUDs, and other long-lasting contraception methods, as well as STD testing and prevention, and sex education.

In another article, written for Ethika Politika (the blog for the Center for Morality in Public Life) in 2011, Lloyd recommended that anti-abortion state legislators across the country write laws that “women must notify the men of their decision to abort, and gain their consent.”

Lloyd wrote that the laws would help to prove a point to the Supreme Court. “The Supreme Court has implied, perhaps without realizing it, that the physical realities of pregnancy for the woman will serve to imbue her most weightless rationales with the magic ability to trump a man’s right to procreation, and his right in his children,” he wrote.

“Savvy state legislators should make the Supreme Court say this outright, if that is the type of regime they support,” he continued, suggesting that, when these laws are inevitably challenged, these arguments could be used to overturn Roe v. Wade, the 1973 Supreme Court decision that made abortion legal.

HHS declined to comment on Lloyd’s writings.

Before his appointment as ORR director, Lloyd had a long history of being involved with anti-abortion organizations. Just prior to his appointment to the Trump administration, Lloyd served on the board of directors for the Front Royal Pregnancy Center, an anti-abortion counseling center. He also worked as a general counsel at HHS under President George W. Bush, during which he coauthored a controversial “conscience rule” enabling health care providers to decline to pay for or provide abortions.

In court arguments last week, ACLU lawyer Brigitte Amiri told the court that under the Lloyd-led ORR’s guidance, Doe had been taken her to an anti-abortion counseling center. They also highlighted a previous case in which Lloyd, as ORR director, personally visited another undocumented pregnant minor to talk her out of getting an abortion.

The majority of ORR’s duties do not involve medical decisions; it’s the wing of the Department of Health and Human Services charged with helping undocumented, unaccompanied children and newly arrived refugees. A 2008 policy issued under George W. Bush gave ORR “heightened involvement” in significant medical procedures such as surgeries and abortions. But in early March, the Trump administration issued a new interpretation of the policy, which explicitly prohibited federally funded shelters are “from taking any action that facilitates an abortion without direction and approval from the Director of ORR.” Lloyd had not yet been officially appointed to ORR when the memo was released, but was already working as an adviser to HHS.

Lloyd employed this policy in mid-September, when he refused to let the pregnant teenager leave the shelter to get an abortion. Court documents show that the shelter was okay with letting her leave the premises to get the abortion, and a state judge waived the law requiring she obtain permission from a parent or guardian.

Lawyers for the Trump administration defended Lloyd’s position in the hearing Friday that the government shouldn’t be “complicit in facilitating” the minor’s abortion and that, in not facilitating the abortion, the government is fulfilling its duty to “act in the best interest” of the minor.

But on Tuesday, a federal appeals court in Washington, DC, ruled that she can get an abortion, over the objections of Trump administration lawyers. She successfully underwent the procedure soon after.

HHS responded to requests for comment for this story with a statement, saying: “For however much time we are given, the Office of Refugee Resettlement and HHS will protect the well-being of this minor and all children and their babies in our facilities. And we will defend human dignity for all in our care.”