AUGUSTA — Mainers will soon be able to once again buy less expensive, mail-order prescription drugs from other countries, despite concerns from some pharmacists that the practice is unsafe.

Under a new state law, residents will be able to buy drugs through firms like CanaRx. The Canadian business distributes prescription medications by mail and from licensed pharmacies in Canada, the United Kingdom, Australia and New Zealand.

Some pharmacists worry the law will open up the state’s borders to counterfeit drugs, posing health risks to Maine residents. But supporters say it will provide significant cost savings to consumers and the state.

“People need to be able to access life-saving drugs at a reasonable price, and this law gives Mainers more options while still allowing Maine pharmacies to negotiate with CanaRx,” the Senate’s Assistant Democratic Leader Troy Jackson, who sponsored the legislation, said in a statement.

CanaRx acts as a middleman, taking prescriptions written by doctors in the U.S. and filling them in out-of-country pharmacies. The company says people can save up to 80 percent off U.S. retail prices.

Until last year, the state of Maine contracted with CanaRx to offer state employees low-cost prescription medications through a program called MaineMeds. But in August, then-Attorney General William Schneider said the program violated state law because CanaRx couldn’t be licensed in Maine.

The new law exempts pharmacies in certain countries from licensing requirements, allowing the state, cities and businesses to legally contract with CanaRx or similar firms. The law also affirms that individuals are allowed to get prescription drugs from those countries. It goes into effect 90 days after the end of the legislative session, expected by early July.

Chris Collins, the company’s insurance program director, said CanaRx hasn’t yet discussed with the state if and when they will restart the program.

“I am very disappointed partly because this bill in my opinion significantly jeopardizes patient’s safety,” said Kenneth McCall, president of the Maine Pharmacy Association. “This bill opens up the secure drug supply chain and allows these types of counterfeit medications into the community.”