The potential benefits of eating elderberries when you have the flu — especially to fight off symptoms of the nasty virus — have long been documented. But a new study released this week claims to have discovered why that may be the case.

Researchers from the University of Sydney and others studied the berries to learn “which phytochemicals, compounds that positively affect health, from elderberries combat influenza infections,” a news release on the findings, which were published Thursday in the Journal of Functional Food, says. In other words, they worked to identify which compounds in the berries help fight off the flu.

TEXAS WOMAN RECEIVES GONORRHEA DIAGNOSIS AFTER RASH ERUPTS ON HANDS, BODY

The deep purple berries, which can be toxic if not cooked fully, warned Healthline, have “potent direct antiviral effect against the flu virus,” Golnoosh Torabian, a study author, claimed in an online statement.

The “common elderberry,” Torabian continued, “inhibits the early stages of an infection by blocking key viral proteins responsible for both the viral attachment and entry into the host cells.”

To come to this conclusion, researchers turned the berries into a “juice serum.” From there, the serum was applied to cells “before, during and after they had been infected with the influenza virus,” the university said.

By the end, the researchers determined the phytochemicals from the elderberry serum helped to stop the virus from infecting the cells. But the berries "were even more effective at inhibiting viral propagation at later stages of the influenza cycle when the cells had already been infected with the virus," the researchers said.

"This observation was quite surprising and rather significant because blocking the viral cycle at several stages has a higher chance of inhibiting the viral infection," Peter Valtchev, who worked on the study, explained in a statement.

MOM'S MEAL PREP MISHAP RESULTS IN SEVERED TENDON, SLICED ARTERY

Additionally, the researchers in Sydney also discovered the serum “stimulated the cells to release certain cytokines, which are chemical messengers that the immune system uses for communication between different cell types to coordinate a more efficient response against the invading pathogen,” Fariba Deghani, who also worked on the research, added.

Elderberries, which can be found in both Europe and North America, could contain cancer-fighting properties and potentially protect against harmful UV rays if applied to the skin, among other benefits, according to Healthline.