Nicole Arteaga, a first-grade teacher who lives in Peoria, Ariz., had a Walgreens pharmacist deny her medication that had been prescribed for a failed pregnancy. Her account of the episode on Facebook prompted calls to boycott the company.CreditRaudel Arteaga

Nine weeks into her pregnancy, Nicole Arteaga got distressing news from her doctor: There was no fetal heartbeat and the pregnancy would end in a miscarriage.

Rather than have a surgical procedure to remove the fetal tissue from her uterus, Ms. Arteaga, a first-grade teacher who lives in Peoria, Ariz., decided on Wednesday to take misoprostol, a medication that can be used to end a failed pregnancy.

The medication is approved by the federal Food and Drug Administration for use by a licensed provider to end a pregnancy within the first 10 weeks, for what is known as a medical abortion.

She dropped off a prescription for the medication and by that night, got an email saying it was ready to be picked up.

But when she tried to get the medication from her local Walgreens on Thursday, the pharmacist asked whether she was pregnant. When she said she was, he refused to give her the misoprostol, citing "his ethical beliefs," she recalled in a detailed account on Facebook.

Ms. Arteaga described her response in the post, which has been shared more than 30,000 times.

"I stood at the mercy of this pharmacist explaining my situation in front of my 7-year-old, and five customers standing behind only to be denied because of his ethical beliefs," she wrote, adding, "I left Walgreens in tears, ashamed and feeling humiliated by a man who knows nothing of my struggles but feels it is his right to deny medication prescribed to me by my doctor."

Walgreens said on Saturday that it had contacted Ms. Arteaga "and apologized for how the situation was handled," but suggested that the employee had not run afoul of company policy by refusing to fill the prescription.

"To respect the sincerely held beliefs of our pharmacists while at the same time meeting the needs of our patients, our policy allows pharmacists to step away from filling a prescription for which they have a moral objection," the company said in a statement.

In an update to her original post, which includes a photo of the pharmacist's business card, Ms. Arteaga said her prescription was ultimately transferred to another Walgreens, where she was able to get the medication "with no problems."

Ms. Arteaga's account evoked strong reactions on social media, where some called on Walgreens to fire the pharmacist and others threatened to boycott the company.

"I was shocked," Ms. Arteaga, 35, said on Sunday. "I couldn't believe that he would tell me that I wasn't going to be able to get my prescription."

She tried to explain her situation but he remained unmoved. "What I have inside of me is an undeveloped baby," she recalled telling the pharmacist. "I need this to help get it out."

In its statement, the drugstore chain said pharmacists who object to a medication are nonetheless "required to refer the prescription to another pharmacist or manager on duty to meet the patient's needs in a timely manner," and that it was "looking into the matter."

A company spokesman, Jim Graham, declined to explain what the investigation might entail.

Six states — including Arizona — explicitly permit pharmacies or pharmacists to refuse to provide medication because of religious or moral objections, according to the National Women's Law Center, a nonprofit and advocacy group.

Nancy Berlinger, a research scholar at the Hastings Center, an independent bioethics research institution, said that so-called conscience clauses have been established law for years.

"This is a very, very well-protected right in the United States," so much so that a principle called duty of care can sometimes be compromised, she said.

"You have a right to step away, but you don't have a right to step between" patients and their access to legal and medically appropriate treatment options, she added.

The name on the business card that Ms. Arteaga photographed, Brian Hreniuc, is included in a directory of licensed pharmacists in Arizona. No one could be reached on Sunday afternoon at a phone number associated with that name.

Ms. Arteaga's post described her anguish over her pregnancy complications — a pain, she suggested, he couldn't possibly empathize with.

"I get it we all have our beliefs," she wrote. "But what he failed to understand is this isn't the situation I had hoped for, this isn't something I wanted. This is something I have zero control over. He has no idea what it's like to want nothing more than to carry a child to full term and be unable to do so."

Sarah Mervosh contributed reporting.

Follow Louis Lucero II on Twitter: @Louis_II.