Gov. Corbett signed legislation Tuesday that is intended to reduce drug overdose deaths - Pennsylvania's rate is seventh highest in the nation, and rising - by increasing the likelihood that police will be asked to help and will be able to administer lifesaving medication.

Nearly 2,300 Pennsylvania deaths were caused by drug overdoses in 2011, many of them due to opioids such as heroin purchased on the street, and pills like OxyContin or Vicodin that may have started as legitimate painkiller prescriptions.

"As a former prosecutor, I've seen opioid addiction and overdoses ruin people's lives and tear families apart," Corbett said during a ceremony at the University of Pittsburgh in Johnstown, adding that the law "will save lives and ensure those who help someone in need aren't punished for doing so."

It passed the House and Senate unanimously and will take effect in 60 days.

The legislation has two main parts, both of which are being implemented by states around the country:

The "Good Samaritan" section prevents a witness to an overdose who calls 911 from being charged or prosecuted in the event that police respond and discover drugs. Addicts often shoot up together, and fear of calling for help has been cited as a significant reason that many simply leave and let someone who is overdosing slowly die.

The other section allows police and other first responders, as well as family and friends of users, to administer the overdose-reversal drug naloxone (brand name Narcan).

The medication, which is not a narcotic and cannot cause a high - to the contrary, it may dramatically disrupt the euphoria - is routinely used by emergency room doctors and by paramedics to restore breathing that is believed to have been halted by an opioid overdose. Given as a nasal spray or injection, it is considered safe and works within seconds by blocking opioid receptors in the brain.

The Camden County Police Department equipped its officers in late May. In what has become a regular occurrence, the department on Tuesday posted a news release under the headline "Officers save three lives in one day using Narcan" - bringing the total to 42, although no one knows how many of the victims who were found unconscious would actually have died.

Accidental overdose deaths have been rising for a decade in many places. Montgomery County has set a record annually for the last four years, for example, and is now on track to exceed last year's 136 fatalities, Coroner Walter I. Hofman said Tuesday.

Pennsylvania's new law allows physicians to prescribe naloxone to friends and relatives of addicts. That's particularly important because the first responder to an overdose is often a parent, said Deborah Beck, who heads the Drug and Alcohol Services Providers Organization of Pennsylvania.

"It's a lifesaving drug," Beck said.

Inquirer staff writer Don Sapatkin contributed to this article, which also contains material from the Associated Press.