Friends and family will be able to take the first step to save a loved one from an overdose of heroin or powerful painkillers called opioids.

The Food and Drug Administration on Thursday approved an easy-to-use device that automatically injects the right dose of an overdose antidote named naloxone before an ambulance arrives.

Doctors could prescribe it for family members or caregivers to keep on hand, in a pocket or a medicine cabinet.

Opioids include legal prescription painkillers, such as OxyContin and Vicodin, as well as illegal street drugs like heroin.

Called Evzio, the device contains naloxone, a long-used antidote for overdoses that is usually administered by syringe in ambulances or emergency rooms. But with the rise in drug overdose deaths, there has been a growing push to equip more people with the protection.

The FDA said Evzio's design makes it easy for anyone to administer.

Once Evzio is turned on, it provides verbal instructions, much like defibrillators that laymen frequently use to help people who collapse with cardiac arrest. It is about the size of a credit card or small cellphone. The antidote is not a substitute for immediate medical care, the FDA said, as anyone who has overdosed will need additional treatment.

Still uncertain is how much the antidote will cost. Executives of the drug's manufacturer, kaleo, Inc., of Richmond, Va., said it is too soon to say.