Walgreens has announced it will stop selling abortion pills in states where officials have threatened legal action, including in states where abortion is still legal.

The pharmacy chain told NPR that it will still sell the drug in “jurisdictions where it is legal and operationally feasible.”

Last month, 20 state attorneys general from states where abortion is banned or restricted sent letters to Walgreens and other pharmacies threatening legal action if they sell mifepristone, an abortion pill, according to NPR.

The letter was sent by Missouri Attorney General Andrew Bailey, cosigned by attorneys general from Alabama, Alaska, Arkansas, Florida, Georgia, Indiana, Iowa, Kentucky, Louisiana, Mississippi, Montana, North Dakota, Ohio, Oklahoma, South Carolina, South Dakota, Texas, Utah, and West Virginia.

“At this time, we are working through the certification process” and not yet distributing the drug anywhere, Walgreens said in a letter to Kansas’ attorney general, according to NPR. “Walgreens does not intend to dispense Mifepristone within your state.”

Walgreens said it responded to all 20 attorneys general to notify them that the company will not be distributing the drug in their states, according to NPR.

The attorneys general also sent letters to CVS, Costco, Walmart, Rite Aid, Albertsons, and Kroger. The other chains have yet to publicly announce whether they will follow Walgreens’ lead.

Rite Aid did offer a statement to CNN. “Rite Aid is monitoring the latest federal, state, legal and regulatory developments regarding mifepristone dispensing and we will continue to evaluate the Company’s ability to dispense mifepristone in accordance with those developments,” Rite Aid spokesperson Catherine Carter said.

The drug is still legal in some states where Walgreens will not sell it, including Alaska, Iowa, Kansas, and Montana, NPR reported.

On December 16, 2021, the FDA removed the in-person requirement to dispense mifepristone. The decision also allowed doctors to prescribe the drug through telehealth appointments and allowed mifepristone to be sent via mail.

In January, the FDA finalized a new rule which expanded the availability of abortion pills, allowing large chains and mail-order pharmacies to complete a certification process to distribute mifepristone. CVS and Walgreens said they were applying for certification.

In Texas, there is an ongoing case before a federal judge to challenge the FDA’s approval of mifepristone altogether, according to NPR.

On Monday, California Governor Gavin Newsom tweeted that his state will no longer do business with Walgreens “or any company that cowers to the extremists and puts women’s lives at risk.”

A spokesperson for Newsom said that all business dealings between Walgreens and California were under review but did not specify how things would change, according to Reuters.