The rates of heart attacks are declining overall in the U.S. — but not among all groups of Americans. According to a new study, heart attack rates are increasing in what may seem like an unlikely group: adults in their 20s and 30s.

What's more, despite their relatively young age, 20- and 30-somethings have the same rate of bad outcomes after a heart attack — including death — as those who are about 10 years older, the study found.

"It used to be incredibly rare to see anyone under age 40 come in with a heart attack — and some of these people are now in their 20s and early 30s," senior study author Dr. Ron Blankstein, a preventive cardiologist at Brigham and Women's Hospital in Boston, said in a statement. "Based on what we are seeing, it seems that we are moving in the wrong direction."

The study will be presented March 17 at the American College of Cardiology's annual scientific sessions meeting in New Orleans, and the findings have not yet been published in a peer-reviewed journal [9 New Ways to Keep Your Heart Healthy]

In the study, researchers looked at data from about 2,100 heart attack patients age 50 and younger who were admitted to one of two large hospitals between 2000 and 2016.

Overall, about 1 in 5 patients, or 20 percent, were 40 or younger. But for the last 10 years of the study, the proportion of patients 40 and younger increased by about 2 percent each year, the researchers said.

In addition, patients 40 and younger were just as likely to die after their heart attack as those ages 41 to 50, meaning that a younger age isn't necessarily protective after a heart attack.

"Even if you're in your 20s or 30s, once you've had a heart attack, you're at risk for more cardiovascular events, and you have just as much risk as someone who may be older than you," Blankstein said.

Both young and older age groups in the study had about the same rate of traditional risk factors for heart disease, including diabetes, high blood pressure, smoking and a family history of heart attack.

But compared with those ages 41 to 50, those age 40 and younger were more likely to report substance abuse, including marijuana and cocaine use. In particular, 18 percent of those in the younger group reported substance abuse, compared with 9 percent of those in the older group. This finding suggests that substance use may be contributing to the trend of heart attacks among young adults, but more research is needed to confirm this.

Younger patients also tended to be less likely to take aspirin and statins after having a heart attack. This finding may suggest that doctors may be less likely to recommend these medications tot younger patients due to their age, the researchers said.

More studies are needed to better understand why heart attacks are increasing among young people.

But traditional advice on heart disease prevention still applies to all age groups.

"It all comes back to prevention," Blankstein said. "Many people think that a heart attack is destined to happen, but the vast majority could be prevented with earlier detection of the disease and aggressive lifestyle changes and management of other risk factors."

Originally published on Live Science.