In the 1980s, women in Brazil began spreading the word about a pill used to treat ulcers. Sold over the counter, the drug carried a warning: Don’t use during pregnancy; risk of miscarriage.

It flew off the shelves. Hundreds of thousands of women, desperate for abortions in a country where the procedure was criminalized, now had an option.

In the decades since, medical professionals say, medication abortion has become one of the safest and most common ways to terminate a pregnancy up to 10 weeks of gestation, including in countries where the procedure is illegal. In the United States, where the abortifacients misoprostol and mifepristone have been approved by the Food and Drug Administration, abortions by pill made up more than a third of all abortions in 2017.

“It’s really a revolution that’s happened in the last 20 years for women,” said Rebecca Gomperts, a doctor in Austria who founded the online medical abortion service Women on Web in 2005.

Providers and analysts say interest in these pills has spiked in the United States since Texas passed a law banning most abortions in the nation’s second-most-populous state.

The law, which prohibits abortion as early as six weeks into pregnancy, without exceptions for rape or incest, could lead people to travel outside of the state for legal abortions. But it is also likely to spur a rise in self-managed abortions outside of formal health care, said Abigail Aiken, an associate professor of public affairs at the University of Texas and principal investigator for Project SANA, which examines self-managed abortion in the United States.

The Supreme Court allowed a Texas law banning abortion past six weeks to remain in effect. Other conservative states may adopt similar measures going forward. (Blair Guild/The Washington Post)

Aid Access, an online service founded by Gomperts in 2018, is prepared to step in. For users in 14 permitted U.S. states, including New York and California, Aid Access’s U.S. doctors provide the pills by mail. For other states and countries, Aid Access refers users to vetted pharmacies in India, which ship the medications to the United States. Costs range from about $105 to $150 — or a discounted price based on need.

In its first two years, Aid Access received more than 57,000 requests from all 50 states — and the pace has been increasing, Aiken said. A study conducted by Aiken, Gomperts and statistician Jennifer Starling found that the highest rates of requests per capita came from states with the most abortion restrictions.

During the coronavirus pandemic, the FDA has temporarily lifted requirements that medication abortion be dispensed to patients in person, a change it is deciding whether to make permanent.

The trend toward medication abortions has caused concern among antiabortion advocates. Eric Scheidler, executive director of the Pro-Life Action League, said he worries that many more people are willing to take a pill rather than undergo surgery because it makes abortion seem more like “a medical procedure rather than … the destruction of a life,” he said. “The unborn child, even at the embryonic stage, is not a tumor … it’s a fellow human brother or sister.”

Since the Texas ban took effect Sept. 1, Aid Access has experienced a steep increase in requests — and a rise in Web traffic from Texas, Gomperts said.

Gomperts and others predict that the number of abortions in Texas will not decline. They say women will order abortifacients by mail or cross state lines or the border into Mexico to find the pills.

“The official rate will go down,” Gomperts said. But the overall rate will stay the same.

Mifepristone and misoprostol, which are taken to stop a pregnancy from progressing and to empty the uterus, are listed as essential medicines by the World Health Organization. One study of nearly 20,000 medication abortions showed that fewer than 1 percent of cases resulted in complications.

Abortion pills are legal in most parts of the United States when prescribed, but 19 states require the clinician to be physically present, according to the Guttmacher Institute. Those who manage their abortions without the help of a medical provider can buy pills through online pharmacies, across the border in Mexico or by forwarding their mail from an address in a state with legal telemedicine abortion, according to Plan C, a group that supports access to the pills.

Aid Access operates in a “gray area on the part of people who run the service, but for people in Texas, there’s nothing in our state law that they’re breaking,” Aiken said. Still, there are legal risks, she said. Farah Diaz-Tello, senior counsel and legal director for advocacy group If/When/How, said prosecutors across the United States have used various criminal laws — such as fetal homicide and improper disposal of fetal remains — to charge women who have ended their own pregnancies.

The FDA issued a warning regarding Aid Access in 2019, claiming that the site violated federal law by introducing “misbranded and unapproved new drugs” into interstate commerce. Gomperts responded by filing a lawsuit, accusing the agency of seizing her patients’ prescriptions, in violation of women’s constitutional rights. The U.S. District Court for the District of Idaho dismissed the suit in 2020, but Gomperts said she would pursue another legal fight “whenever necessary.”

The Texas legislature has advanced a bill that would make it a criminal offense to mail abortion pills in Texas and decrease the legal time frame for abortion pill usage from 10 to seven weeks. The Texas ban focuses on the provider, allowing private citizens to take legal action against anyone who helps terminate a pregnancy.

Sales of abortion medication worldwide are booming, said Chris Purdy, chief executive of DKT International, one of the largest private providers of family planning products. Ninety-three percent of abortions in Sweden are medical. In India, the abortion rights and access advocacy group Ipas reported in 2019, the proportion is an estimated 73 percent.

In several Latin American nations, misoprostol is relatively easy to find in pharmacies.

“In some of these countries, it’s easier to get an abortion than in countries where it’s legal,” Gomperts said.

Caitlin Gerdts, vice president for research at Ibis Reproductive Health, which advocates for abortion rights and access, said Americans could learn from the harm-reduction models developed across Latin America. Groups there have created telephone hotlines and support networks for women seeking abortions.

In Peru, where abortion is legal only to preserve the life and health of the woman, one nonprofit clinic found a way to work around the abortion ban.

Guadalupe Torres, project coordinator at INPPARES, said the clinic followed a model developed in Uruguay that was associated with a decline in abortion-related deaths: When a patient made it clear she did not want to continue with a pregnancy, a counselor would inform her of options available in countries where abortion is legal — including misoprostol, Torres said.

A 2018 study published in PLOS One examining the Peruvian clinic’s counseling services found that nearly 90 percent of 220 women reported having a complete abortion after taking only misoprostol, and 8 percent reported adverse events such as hemorrhage, infection or severe pain.

In Peru, misoprostol can be purchased legally in a pharmacy only with a prescription. But certain pharmacies — or people standing outside those pharmacies — will sell the drug without a prescription. Others find pills through donations to feminist collectives or on Facebook groups.

Lila, a volunteer with the collective Serena Morena, said she helps at least three women each week find pills. She spoke on the condition she be identified by that name, which she uses in the collective, because of a fear of legal penalties.

In mid-March, she began to suspect she was pregnant. She has a son and said she could not imagine financially supporting another child on her freelance income, especially in the middle of the pandemic. “My first question was how can I find misoprostol?” she said. Through a Facebook group, she found a woman who had the pills and agreed to meet her — defying a strict lockdown in Lima — to give her the medication. She took two buses, on empty streets lined with security forces, to meet the woman in a gas station. An officer followed her in.

He did not approach her, and she managed to walk away with the pills. They worked.

“If he were to catch me, with the pills and without a prescription, it would’ve been terrible,” she said. “These are the things we have to do to exercise the right that is our own.”