The overdose-reveral drug Naloxone, shown here as a nasal injector, is available without a prescription to anyone in Maryland trained to use it. (John Minchillo/AP)

Overdose deaths from the powerful synthetic opioid that killed rock legend Prince in April increased 83 percent in Maryland last year, according to the state’s Department of Health and Mental Hygiene.

The latest data on Maryland overdose deaths, which the department released Thursday, showed 340 fentanyl-related fatalities in 2015, compared with 186 the previous year.

The rise continues an alarming trend that began in 2013. Since that year, the number of fentanyl-related deaths has increased ­12-fold.

Health officials attribute the rapid spike to illicit fentanyl, rather than the prescription form of the drug. Illicit fentanyl is produced in underground laboratories and often mixed with heroin to create an especially strong high. They say the drug can be 50 to 100 times more potent than heroin and morphine.

Deaths from all categories of opioids reached new highs in Maryland last year, with heroin fatalities increasing 29 percent, to 748, while deaths from prescription pain medications climbed 6 percent, to 351. It was the fifth straight year that heroin deaths were on the rise, and the third straight year for prescription ­opioids.

Overall, opioids accounted for 86 percent of Maryland overdose deaths in 2015.

“Maryland, like many states across the nation, has been in the midst of an opioid epidemic,” said Health and Mental Hygiene Secretary Van T. Mitchell. “Health and Mental Hygiene continues our work to try to save lives by making residents aware of the peril associated with substance-use disorder and of the resources available to treat those who grapple with this problem.”

A Washington Post-University of Maryland poll in October showed that nearly 3 in 10 Marylanders have a close friend or family member who was or is addicted to opioids.

Gov. Larry Hogan (R), who lost a cousin to a heroin overdose, created a task force last year to study the issue and recommend plans for addressing it.

Based on the work group’s input, Hogan released more than $2 million last year to increase access to treatment in rural parts of the state, create an outreach program in Baltimore for overdose survivors, launch a public-awareness campaign about the dangers of addiction, and boost police efforts to disrupt drug trafficking.

The state also authorized pharmacists to dispense the overdose-reversal drug naloxone without a prescription to people trained and certified through the state’s Overdose Response Program, which has graduated 23,000 people since 2014.

This year, Hogan dedicated $3 million in new spending to support addiction treatment in prisons and $2.3 million to fund a modest increase in the reimbursement rate for providers of drug-abuse treatment, with the goal of attracting and retaining more workers in the field.

Additionally, Hogan and the General Assembly approved legislation that requires prescribers to use a statewide database to track potential abuse of painkiller medications, with a requirement to alert doctors and pharmacists and notify licensing boards and police of suspicious activity.