In a law of unintended consequences, an over-the-counter treatment for diarrhea, typically seen as commonplace and harmless, is accounting for a rising number of overdoses, reports the Atlantic magazine.

One reason for the overdoses is the desperate need of people experiencing opioid withdrawals to turn to something that -- in large doses, such as dozens or hundreds of pills daily – creates a buzz or provides relief from severe withdrawals pains.

“It’s a cheap, legal and easily accessible opioid alternative,” William Eggleston, a clinical toxicologist at SUNY Upstate Medical University, said.

The number of calls to poison centers regarding the ingestion of dangerous levels of the diarrhea treatment, known as loperamide, doubled between 2010 and 2015, the magazine reported.

The FDA even has notified doctors to monitor loperamide abuse.

As recently as 2012 loperamide abuse was still not widely known.

Raminta Daniulaityte, a researcher at Wright State University, wrote a paper raising alarms about the medicine.

“There was no research at all and nobody really knew about it,” she said.

Some patients who commented on an online forum the researcher used to post the study results, defended it, saying it helped them deal with opioid withdrawals.

Another person said: “It’s a cheap, legal and easily accessible opioid alternative.”

The Atlantic said that loperamide, in safe doses, works well to control diarrhea, but not in cases where people seek a buzz.

Eggleston said he’s heard of people taking 400 or 500 tablets a day. “They put it in a blender and make a smoothie and drink it over one or two hours,” he said.

While loperamide does not reach the brain cells, it can cause death in some cases, as well as drowsiness and struggle breathing. Large doses can block calcium channels, making it difficult for the heart to maintain a steady rhythm.

One doctor, Somwail Rasla, an internal medicine resident at Memorial Hospital of Rhode Island, described a young man in his late 20s who arrived with an abnormal EKG.

“There’s no reason such a young patient should have it, except as a congenital abnormality or medication induced,” said Rasla.

As it turned out, the patient was taking up to 150 tablets of loperamide daily, landing him in an intensive care unit and a nine-day stay in the hospital before he was released.

The problem of misuse of the medication didn’t come onto the public’s radar until recently because it was only in the last few years that people began taking massive quantities of it, the magazine reported.

Experts fear it will get worse before it gets better. “We will see more cases because the more restrictions [there are] on opioids, the more doctors are afraid of trying to extend their prescriptions, the more people will seek different substances,” said Rasla.