NEW YORK — Philip Seymour Hoffman died from taking a combination of heroin, cocaine and other drugs, the New York City medical examiner ruled Friday, a toxic mix that addiction specialists say is not uncommon in the tens of thousands of overdose deaths in the U.S. each year.

Hoffman, 46, who was found Feb. 2 with a needle in his arm on the floor of his Manhattan apartment, also had taken amphetamines and benzodiazepines, which are drugs such as Xanax and Valium that are widely prescribed for anxiety, trouble sleeping and other problems, said a spokeswoman for the medical examiner. The death was ruled accidental. The medical examiner didn’t provide the names of the drugs or the amounts found in Hoffman’s system, making it impossible to determine which drug was the major factor, said Dr. Charles McKay, a medical toxicologist for Hartford Hospital in Connecticut and a spokesman for the American College of Medical Toxicology.

“There’s a difference between a stimulant death, which would be cocaine and the amphetamines, and a narcotic death, like heroin,” he said.

The first two can cause heart rhythm problems, a stroke or heart attack, whereas heroin, especially with sedatives such as benzodiazepines, can depress breathing.

In any case, McKay said, the combination of drugs “suggests someone who has been using drugs repetitively.”

Police had been investigating Hoffman’s death as a suspected drug overdose. Tests found heroin in samples from at least 50 packets in his Manhattan apartment. Authorities also found unused syringes, a charred spoon and various prescription medications, including a drug used to treat heroin addiction, a blood-pressure medication and a muscle relaxant.