Naloxone isn’t magic, but its power to rescue a heroin user from the brink of death can certainly seem miraculous. The anti-overdose drug, also known by the brand name Narcan, is easy to administer and has saved thousands of lives. First responders are often awestruck at how swiftly it can revive a dying addict.

"It's just incredible," the deputy fire chief of Revere, Mass., marveled in a public-radio interview last year. "There's somebody who's on the ground who's literally dead. They have no pulse. Sometimes they're blue, sometimes they're black. And you administer this stuff and sometimes in a minute or two or three, they're actually up and talking to you."

Free markets aren't magic either. Yet their ability to generate a life-saving drug like Naloxone, supplying quantities sufficient to make it widely available even when the need is great, can seem even more miraculous. That miracle is not enhanced when politicians rebuke the entrepreneurs who manufacture or distribute such wonder drugs for charging a price that the market will bear.

Politicians, for instance, like Massachusetts Attorney General Maura Healey. She lists opiate abuse among her most urgent public concerns, yet is going out of her way to pick a fight with vendors who actually help make things better.

In recent years, drug overdoses have surpassed automobile accidents as the leading cause of death from injury in the United States. According to the Centers for Disease Control, opiate painkillers alone account for 16,000 fatalities annually; deaths involving heroin have increased fivefold since 2001.

Amid this grim crisis of opioid overdoses, Naloxone has been a godsend. While public-health experts debate the causes of the epidemic, officials nationwide have been moving rapidly to expand access to the drug. The National Conference of State Legislatures reports that 30 states and the District of Columbia have adopted a variety of measures to facilitate the use of Naloxone. Among those measures: allowing it to be administered by non-medical personnel, paying for police and firefighters to carry supplies of the drug, and permitting pharmacies to dispense Naloxone without a prescription.

Of course, with demand for the medication skyrocketing, the price has climbed as well. The workings of economics apply to pharmaceuticals just as they apply to housing, bourbon, iPhones, or tickets to NFL playoff games. When demand for a product or service rises, the price of that product or service can't help but rise in response. That is especially true when the growth in demand has come about quickly or in unexpectedly short order. Heroin overdose rates have increased markedly since 2010, and only in the last year or two has there has been such a strong push by state and local authorities to equip first responders — police officers, sheriffs, firefighters, and even civilian bystanders — with Naloxone kits.

So it stands to reason that in Massachusetts, as in most other states, the price of Naloxone is up sharply. A 2-milliliter dose that used to cost the state $19.56 has more than doubled to $41.43. That's a sizeable increase, and it is putting a strain on public-safety and drug-treatment budgets.

The price spike may be unwelcome — no one likes to pay more for vital supplies — but it is hard to see anything unfair or unethical, let alone unlawful, about it. That hasn't stopped Healey from demanding that companies selling Naloxone in Massachusetts provide detailed explanations for the higher costs of the drug, and account for "any changes in prices over time" since the opioid crisis was declared a public emergency. Healey's spokesman insists the attorney general "isn't suggesting anything nefarious," and is simply conducting "a fact-finding mission." But the innuendo is all too obvious.

Healey has said she is just being "aggressive" and wants to be sure "that nobody is out there unnecessarily profiteering from a public health crisis." Yet who is the real "profiteer" here? The drug maker who responds to an unprecedented surge in demand for a critical medication by raising prices to ensure that inventories of the drugs aren't immediately depleted? Or the ambitious politician, who sees a chance to score political points by posing as a defender of the public against the very suppliers who are making available what the public needs?

Demand for Naloxone is way up; consequently the price of Naloxone is up. Eventually the price will fall, as new supplies come on line. In the meantime, thanks to the workings of the market, more lives are being saved.