When it comes to exercise for heart health, you don't want to peak too early in life. New research suggests that if you want to protect yourself against high blood pressure as you age, you need to play the long game and keep your exercise levels up through middle age.

But social factors can make this more difficult for some people to do than others, according to a study of more than 5,000 people across 4 US cities.

"Teenagers and those in their early 20s may be physically active but these patterns change with age," said study author and epidemiologist Kirsten Bibbins-Domingo at the University of California, San Francisco (UCSF).

Numerous studies have shown that exercise lowers blood pressure, but the new work suggests that "maintaining physical activity during young adulthood – at higher levels than previously recommended – may be particularly important" for preventing hypertension," Bibbins-Domingo said.

Hypertension, also known as high blood pressure, is a serious condition affecting billions of people worldwide. It can lead to heart attack and stroke; it's also a risk factor for developing dementia in later life.

Upwards of one in four men and about every fifth woman has hypertension, according to the World Health Organization. But most people with high blood pressure don't even know they have it – hence why it's often called the "silent killer".

Yet there are ways to turn high blood pressure around: exercise being the focus of this study.

Over 5,100 adults were recruited to the study, which tracked their health over three decades with physical assessments and questionnaires about their exercise habits, smoking status, and alcohol intake.

At each clinical assessment, blood pressure was measured three times, a minute apart, and for the data analysis, participants were grouped into four categories, by race and gender.

Across the board – amongst men, women, and in both racial groups – levels of physical activity slumped from 18 to 40 years of age, with rates of hypertension rising and physical activity falling over subsequent decades.

According to the researchers, this suggests that young adulthood is an important window for intervening to prevent midlife hypertension with health promotion programs designed to boost exercise.

"Nearly half of our participants in young adulthood had suboptimal levels of physical activity, which was significantly associated with the onset of hypertension, indicating that we need to raise the minimum standard for physical activity," said lead author Jason Nagata, a UCSF expert in young adult medicine.

When the researchers looked at the people who had done five hours of moderate exercise a week during early adulthood – double the minimum amount currently recommended for adults – they found this level of activity lowered the risk of hypertension considerably, and especially if people maintained their exercise habits until age 60.

"Achieving at least twice the current minimum adult [physical activity] guidelines may be more beneficial for the prevention of hypertension than simply meeting the minimum guidelines," the researchers write in their paper.

But it's not easy to step up weekly physical activity amidst life-changing decisions and growing responsibilities.

"This might be especially the case after high school when opportunities for physical activity diminish as young adults transition to college, the workforce, and parenthood, and leisure time is eroded," said Nagata.

As for another sobering truth, the study also showed how Black men and Black women experience starkly different health trajectories compared to their White counterparts. At 40 years of age, physical activity levels plateaued among White men and women, whereas activity levels in Black participants continued to decline.

By 45 years, Black women surpassed White men in rates of hypertension, while White women in the study experienced the lowest rates of hypertension through midlife.

And by age 60, between 80 to 90 percent of Black men and women had hypertension, compared with just below 70 percent for White men and around half of White women.

The research team put these well-known racial disparities down to a multitude of social and economic factors; not that these factors were assessed in this study, although high school education was noted.

"Although Black male youth may have high engagement in sports, socioeconomic factors, neighborhood environments, and work or family responsibilities may prevent continued engagement in physical activity through adulthood," Nagata said.

The study was published in the American Journal of Preventive Medicine.