A Wal-Mart spokesman said the company would comply with the directive by the Massachusetts Board of Pharmacy, and is reviewing its nationwide policy governing the so-called "morning after" pill.
"Clearly women's health is a high priority for Wal-Mart," spokesman Dan Fogleman said. "We are actively thinking through the issue."
Wal-Mart now carries the pill only in Illinois, where it is required to do so under state law. The company has said it "chooses not to carry many products for business reasons," but has refused to elaborate. Wal-Mart pharmacists are told to refer customers to a different drug store if the pharmacy doesn't carry a certain medication.
Tuesday's unanimous decision by the pharmacy board comes two weeks after three women sued the Bentonville, Ark.-based retail giant for failing to carry the drug in its 44 Wal-Marts and four Sam's Club stores in Massachusetts.
The women had argued that state policy requires pharmacies to provide all "commonly prescribed medicines."
The board sent a letter to Wal-Mart lawyers on Tuesday informing them of the decision, said health department spokeswoman Donna Rheaume. Wal-Mart has until Thursday to provide written compliance with the board's decision.
"We did receive a letter and we will certainly comply," Fogleman said.
It was unclear how quickly Wal-Mart would have to stock its stores.
The pill provides a high dose of hormones that women can take up to five days after sex to prevent pregnancy. Some abortion opponents believe emergency contraception is a form of abortion because it blocks the fertilized egg from being implanted on the uterine wall.
A new state law that took effect late last year following heated debate on Beacon Hill requires all hospitals to provide the morning after pill to rape victims. It also allows pharmacists to dispense the pill without a prescription, but does not require them to do so.
CVS, the state's largest pharmacy chain, stocks the pill at all of its pharmacy locations, as do the state's other major pharmacy chains.
Sam Perkins, a lawyer for the three women, praised the board's decision and said he was prepared to file lawsuits in other states should Wal-Mart not overturn its policy. Abortion rights groups and women's organizations have also urged Wal-Mart to change its policy.
"From our point of view, they've bowed to the pressure of litigation, in part," Perkins said.
The plaintiffs — Katrina McCarty, 29, of Somerville, Julia Battel, 37, of Boston, and Dr. Rebekah Gee, 30, of Boston — were turned away when they tried to buy emergency contraception pills at area Wal-Marts.
The women said they knew they would be refused when they went to the Wal-Marts in Quincy and Lynn and that the action was planned with the abortion rights groups and lawyers.
"I'm proud to be able to tell my patients that they now can go anywhere for their prescriptions," Gee said. "My patients should not have to shop around."