As people prepare to dig into their favorite Halloween candy, there's one treat with a new consumption warning for adults.

Recently, a 54-year-old Massachusetts construction worker died after he ate a bag-and-a-half of black licorice every day for a few weeks that threw off his electrolytes and caused cardiac arrest, according to the New England Journal of Medicine.

The man was reportedly at a fast-food restaurant when he gasped suddenly and lost consciousness. Emergency medical services arrived on the scene and attempted CPR before the patient was taken to a nearby hospital and evaluated after cardiac arrest associated with ventricular fibrillation.

PHOTO: Black licorice candy
STOCK PHOTO/Getty Images
Black licorice candy

According to the U.S. Food and Drug Administration, eating black licorice in excessive amounts can prompt low potassium levels and trigger a series of irregularities and health issues.

Dr. Neel Butala, an Interventional cardiology fellow at Massachusetts General Hospital who treated the patient, told "Good Morning America" that while these cases are very rare, some smaller amounts of the candy can add up over time.

"Even consumed in smaller quantities, licorice can lead to slight increases in your blood pressure, which, if you have underlying high blood pressure, heart failure or heart rhythm problems, can lead to long-term heart problems."

PHOTO: Licorice is the common name for a flowering plant from the bean family named glycyrrhiza glabra.
Brian Hagiwara/Getty Images
Licorice is the common name for a flowering plant from the bean family named glycyrrhiza glabra.

"If you're 40 or older, eating 2 ounces of black licorice a day for at least two weeks could land you in the hospital with an irregular heart rhythm or arrhythmia," the FDA said in a statement about the candy that contains glycyrrhizin (glycyrrhizic acid) -- the sweetening compound derived from licorice root.

Alexandra Lambert, D.O., M.P.H., an ABC News Medical Unit contributor, explained that the compound can be found in other candies and supplements, but it's most commonly seen in the old-school candy with a distinct anise aroma.

"This case may be an extreme example of the deleterious effects of black licorice as there are not many other cases in the literature," Lambert added.

"Not all licorice-flavored foods contain this compound," she said. "Glycyrrhizin can cause low potassium levels in the body, which can lead to abnormal heart rhythms, high blood pressure, swelling, lethargy and congestive heart failure in some people."

In some cases, Lambert added, abnormal heart rhythms could be fatal.

PHOTO: A woman takes some licorice from a bulk bin at a store in Hanover, Germany, Sept. 1, 2016.
picture alliance via Getty Image
A woman takes some licorice from a bulk bin at a store in Hanover, Germany, Sept. 1, 2016.

While many products with licorice don't disclose how much of it is contained per ounce, the FDA regulates that soft candy can only contain up to 3.1% glycyrrhizic acid.

Black licorice can "interact with some medications, herbs and dietary supplements," Lambert continued. "Experts believe that potassium levels usually return to normal without causing permanent health problems when consumption of black licorice stops."

PHOTO: Black licorice candy
STOCK PHOTO/Shutterstock
Black licorice candy

According to the National Institutes of Health, the root of the low-growing shrub that's native to South Africa has a "long history of use as a folk or traditional remedy in both Eastern and Western medicine."

Although the NIH cites some cases of use for treatment of heartburn, stomach ulcers, bronchitis, sore throat, cough and some infections caused by viruses, the agency said, "there are insufficient data available to determine if licorice is effective in treating any medical condition."

For big black licorice fans, the FDA recommends the following advice: "No matter what your age, don't eat large amounts of black licorice at one time. If you have been eating a lot of black licorice and have an irregular heart rhythm or muscle weakness, stop eating it immediately and contact your health care provider. Black licorice can interact with some medications, herbs and dietary supplements. Consult a health care professional if you have questions about possible interactions with a drug or supplement you take."

Hershey's, the maker of the popular Twizzlers licorice candy, told ABC News in a statement that "all of our products are safe to eat and formulated in full compliance with FDA regulations. All foods, including confectionery, should be enjoyed in moderation and as part of a complete and balanced diet."