When you have your morning coffee, you might be doing more than just giving yourself a boost to start your day — you could also be keeping your liver healthy. New research presented earlier this month at the American Society for Nutrition’s annual meeting in Boston suggests that coffee lovers might have a lower risk of liver disease compared to those who forego drinking a regular cup of joe.

A research team led by Emily Hu, doctoral student at the Johns Hopkins Bloomberg School of Public Health, analyzed data on 14,208 people between the ages of 45 and 64 who had been part of the national Atherosclerosis Risk in Communities (ARIC) study. This study looked at the presence of atherosclerosis — a disease in which plaque builds up in your arteries — among people in the United States.

Over a 26-year period, these people all filled out questionnaires on what foods they consumed, including coffee. Hu and her team zeroed in on those who said they drank coffee and cross-referenced them, using hospital discharge records and death certificates, with people in the study who experienced liver-related hospitalizations and death.

What they found is good news for coffee fans: People who drank three or more cups a day had a 21 percent lower chance of being hospitalized for a liver-related illness.

“It was a really great experience to present this research and it was quite surprising how much interest there was in this research,” Hu told Healthline. “Everyone who loves coffee was delighted to hear these results.”

Hu said that the ARIC study presented a rich cross-section of Americans, surveying communities in four states — North Carolina, Mississippi, Minnesota, and Maryland.

“Others have said it would not be surprising that coffee may be protective of liver disease and that it may be beneficial for the liver,” she added. “One thing that was interesting was that this cohort presented a mix of characteristics of those who were drinking coffee. Some were current smokers. People who drink high amounts of coffee are more likely to be current smokers and are more likely to drink alcohol.”

She explained that coffee’s ties to liver health weren’t diminished even when other factors like bad diets or smoking were taken into account. The average person in the survey drank a little less than two 8-ounce cups per day.

Dr. Jamile Wakim-Fleming, a gastroenterologist at Cleveland Clinic, said that the results of this study are consistent with past research on coffee being tied to lower risk for liver disease.

She did caution, however, that people avoid adding too much sugar or cream — or at least doing it in moderation — to avoid risks to your heart. This means keeping those calorie-bursting Starbucks Frappuccinos to a minimum.

“I do tell my patients to drink coffee if they want, it does specifically help those who had evidence of alcoholic liver disease,” Wakim-Fleming told Healthline. “But one should note that they can’t continue to drink alcohol if they want to improve their liver disease, even if they drink coffee.”

She added that coffee isn’t a magic cure for liver disease and that people need to be mindful of underlying reasons for liver disease like alcohol consumption.

The new study is certainly not the first to point to the health benefits of coffee. A 2017 review of 201 studies found that coffee, in general, was associated more with health benefits than harm. The authors found that coffee consumption presented a lower risk of everything from heart disease and cancer, to neurological, metabolic, and, yes, liver conditions.

Coffee is hugely popular in the United States. About 54 percent of people over 18 in the United States drink coffee every day, according to the Harvard’s T.H. Chan School of Public Health.

Over time, opinions on just how healthy coffee is have veered from negative to positive. Back in 1991, the International Agency for Research on Cancer (IARC) — the cancer research arm of the World Health Organization — identified coffee as a possible carcinogen, looking at studies that tied the caffeinated drink to bladder cancer.

Flash forward to a 2016 report in The Lancet Oncology and the IARC changed its tune on coffee. It dropped coffee from its list of possible causes for cancer, saying it was no longer possible to say that coffee caused the disease, the American Cancer Society reports.

Hu and her team recently submitted their research for journal review. She said that at the conference in Boston people kept coming up to her asking how much coffee they should be drinking.

“I want to clarify for people who are asking that even though we found this association that adds to the evidence that coffee could be beneficial for people’s health and that it is definitely not harmful, if they are not drinking coffee that is okay,” Hu said. “They can get health benefits from other foods in their diet. They don’t need to worry. For those who are drinking coffee, it is fine to continue drinking coffee guilt-free.”