An Alabama mother had her newborn baby taken away from her after a drug-test detected traces of opiates in her system — from poppy seed bread she ate a day earlier, according to reports.

Rebecca Hernandez, of Huntsville, was given a drug test after giving birth at Crestwood Medical Center last Tuesday — and her son was swiftly removed after it came back positive for opiates, WAFF reports.

By the time a more official state laboratory test came back Friday stating she was clean, the new mother had lost three days with her new baby.

The original test turned out to be a “false-positive,” a result that Hernandez’s doctor attributed to the poppy seed bread she consumed on Monday, WAFF reports.

“I mean, this is a nightmare for the whole family,” Hernandez told the station through a translator. “You know, a newborn baby, they have to be with the mom. They have to close to the mom.”

The newborn, along with Hernandez’s 13-month-old, were sent to live temporarily with Hernandez’s aunt and uncle, who also had to submit to a drug screening before being granted custody, according to WAFF.

Dr. Yashica Robinson, an obstetrician and gynecologist, is now calling for an end of same-day drug screenings at hospitals, saying staffers should instead rely on laboratory-confirmed tests before contacting social service agencies.

“Screening tests can have what we call false-positive results, where other things can interfere with those results,” Robinson told the station. “You can have a substance that a patient eats, as in this case, like poppy seeds that can make the test positive for opioids.”

Poppy seeds, which are derived from opium poppies, can contain traces of morphine, which can trigger a positive test result.

“I understand everything is a process,” Hernandez told the station Thursday. “I understand everything — I mean, you have to follow rules. But they should’ve done some more research before they decided to call [the Alabama Department of Human Resources].”

A message seeking comment from Crestwood Medical Center was not immediately returned Tuesday. However, the hospital said it was “committed to following the law and regulatory requirements” in a statement to WAFF.

“Our hospital also incorporates patient care practices that are established by credentialed members of our medical staff so as to further ensure safe and quality care for all of our patients,” the statement read.