Good news: Pharmacists cannot deny patients medicine, including Plan B or other emergency contraceptives, even if they have a religious objection, according to a new ruling from the 9th U.S. Circuit Court of Appeals in San Francisco.

The court ruled on Thursday that a Washington state mandate for pharmacies to sell all prescription drugs does not discriminate against religious believers.

The decision overturns a trial court’s ruling in favor of two pharmacists located in Olympia, Washington, who objected on religious grounds to selling emergency contraception.

The two pharmacists have been engaged in an eight-year court battle against a state regulation requiring that pharmacies must make Plan B and other emergency contraception available.

Under the state regulation a pharmacist with a religious objection to the drug can refuse to fill a prescription only if another pharmacist at the store is available who will.

The unanimous decision issued by the three-judge panel of the 9th U.S. Circuit Court of Appeals overturns a 2012 ruling by U.S. District Court Judge Ronald B. Leighton, who had found that the state’s rules violated the religious freedom of pharmacy owners. It was the second time the appeals court reversed Leighton in the case.

In a prepared statement Washington Attorney General Bob Ferguson said:

This unanimous decision is a major victory for the people of Washington. Decisions regarding medical care — including reproductive rights — are appropriately between a patient and his or her medical professionals.

The Washington, D.C.-based Beckett Fund for Religious Liberty called the decision unfortunate:

The government has no business punishing citizens solely because of their religious beliefs.

The government is not punishing anybody for their religious beliefs. The government is only making sure that pharmacists are not allowed to use their religious beliefs as a justification to discriminate, and deny patients necessary medication.

Bottom line: If you’re a pharmacist, do your job. If you don’t like doing your job, find another job.