A Minnesota woman has filed a lawsuit against a local drugstore and two pharmacists after she says she was denied a prescription for emergency contraception due to personal beliefs.

Andrea Anderson, 39, and her longtime partner have five children between their biological and foster children. The family lives in McGregor, a town of about 400 people in rural Minnesota. After the couples' regular means of contraception failed, Anderson called her gynecologist. She told KSTP-TV in St. Paul that she and her partner couldn't risk to "roll the dice."

Her gynecologist prescribed ella, a pill that must be taken within five days of unprotected intercourse to prevent pregnancy. But when Anderson went to fill the prescription at the only pharmacy in town, Thrifty White, she was denied.

According to KSTP, the lawsuit alleges that the pharmacist, George Badeaux, refused to fill the prescription based on his personal beliefs about the product. He also allegedly warned Anderson about trying to fill the prescription at nearby pharmacies.

According to the Minneapolis Star Tribune, a 1999 law allows pharmacists to refuse prescriptions for emergency contraceptive pills on personal beliefs. However, the pharmacist is required to tell the patient where else they can obtain the pill.

Per WCCO in Minneapolis, Anderson visited a CVS in 30 minutes away Aitkin, which also refused to sell Anderson the drug. The pharmacist allegedly called a Walgreens in Brainerd — located 50 miles away from Anderson's home — and told her that the store also did not have the pill in stock.

Anderson called the Brainerd Walgreen's herself, who confirmed that the did, in fact, have the pill. But by the time she learned the pharmacy had the contraceptive in stock, a snowstorm was bearing down on the region.

With little time remaining before the contraception would become ineffective, Anderson claims she had no choice but to pack her young son in a car and drive more than 100 miles to Brainerd and fill her prescription. The lawsuit says that due to the blizzard-like conditions, the trip took three hours.

On Monday, Anderson filed a lawsuit against Thifty White, Badeaux and the unnamed CVS pharmacist that would not fill her prescription. The lawsuit claims the refusal to fill the prescription constitutes gender discrimination.

According to KTSP, Badeaux no longer works at Thrifty White. The Star Tribune also reports that the owner of Thrifty White offered Anderson a gas card for her trouble, but she's refused to use the card.

Alex Hider is a writer for the E.W. Scripps National Desk. Follow him on Twitter @alexhider.