PORTLAND, Maine — Portland police officers will start carrying Narcan, a medication that can save lives by reversing the effects of a drug overdose.

All patrol officers in the city will carry the drug, also known by its pharmaceutical name naloxone, and every department officer has been trained in its use, Police Chief Michael Sauschuck announced Friday morning.

There have already been 21 overdose deaths in Portland this year and the police department has responded to a “couple hundred” overdose calls, Sauschuck said. Introducing Narcan is part of the department’s effort to address the opioid epidemic in Portland, which has also included hiring a substance use disorder liaison to help police approach addiction “as a medical problem, not a criminal issue,” according to a city statement.

“I don’t think that Narcan is a long-term solution,” said Sauschuck. “But it is a miracle drug. It is saving lives in real time.”

The medication was provided by the Maine Attorney General’s office, which previously supplied many other police departments, including those in Westbrook and Bangor, across the state with doses of the drug.

It has been carried by paramedics and firefighters in Portland for several years, and Sauschuck said that the proximity of other first responders initially made him skeptical that police in the city also needed to carry the lifesaving drug.

But the deepening opioid epidemic led the chief to change his mind. Last year, the Portland fire department administered Narcan 161 times, a number that Sauschuck said is up roughly 50 percent from 2014.

“If we’re saving one life, that’s exactly why we’re doing this,” he said.

Narcan works by temporarily blocking the brain receptors that respond to opioids like heroin, thereby allowing someone who has overdosed to begin breathing again. The drug is non-addictive and not harmful if given to someone who has not overdosed. It can be dispensed as an injection or nasal spray, which is the method the police in Portland will use.

Its critics have suggested that the pharmaceutical may have the unintended consequence of providing drug users with a safety net that allows them to seek more intense highs. These critics include Gov. Paul LePage, who vetoed a bill that was eventually approved to allow Maine pharmacists to dispense Narcan without a prescription. LePage’s veto was overwhelmingly overruled in both the House and Senate.

In the first six months of 2016, 189 Mainers died of drug overdoses, according to a recent study. That puts this year on track to far surpass the previous record set in 2014, when the overdose death toll was 208.

Since the attorney general began distributing Narcan this June, police officers around the state have revived 14 people, the Portland Press Herald reported in August.

But Sauschuck said more needs to be done to prevent addiction and treat it before it gets to the point of overdose.

“We still need more of everything and you just need to look at the number of dead bodies to get a sense for the lack of intervention and prevention,” he said.