Cases of melanoma fell among people younger than 30 in the United States from 2006 to 2015, suggesting efforts to encourage protection from the sun are paying off, a new study says.

Overall cases of melanoma increased from 2001 to 2015, the study said, especially among people 40 and older. But the number of cases among adolescents and young adults dropped more than 23% from 2006 to 2015.

"It's one of the first times that we've seen skin cancer rates decreasing, especially in a population that was growing recently," due to teens engaging in unsafe sun practices in the past, said Dr. Anne Chapas, medical director of Union Square Laser Dermatology in New York, who was not involved in the study.

Researchers analyzed data from nearly 1 million cases of invasive melanoma for the study, published Wednesday in the medical journal JAMA Dermatology.

Melanoma is the fifth most common cancer in the United States, and linked to more than 9,000 deaths a year in the United States, the study said. The greatest risk factor for melanoma is ultraviolet light exposure, either by sunlight or tanning beds.

Young people and newer parents might be more aware of the dangers of excessive sun exposure and what can be done in childhood to prevent skin cancer, Chapas said. One reason for higher rates of melanoma in older adults could be that public health efforts for sun-protective behaviors, such as using sunscreen, didn't begin in the United States until the late 1990s.

Older adults have a longer history of unsafe sun practices and cumulative sun exposure over their lifetime.

"We're used to seeing the accumulation of ultraviolet damage in older people. If you accumulate ultraviolet damage throughout your life, there's only going to be so many genetic hits your skin can take and it'll eventually develop skin cancer," Chapas said.

Still, there are risks for young people. The study said young adult women appeared to have twice the risk of melanoma as young adult men.

"That still does go back to the social practices between men and women where women are still actively trying to become tan and to try to change their skin color and think that a tan is attractive and that's still a myth of information that's still out in the population," Chapas said. "Whereas men, I find, are not generally tanning. Their sun exposure is more from outdoor sports and things of that nature."

The study does have limitations. National registry data on melanoma cases do not include information about skin pigmentation, UV light exposure, sunburn history, sun-protective behaviors, sun avoidance or tanning bed use, so researchers couldn't estimate the association between increased sun-protective behavior and reductions in melanoma incidence.

Despite the rising number of melanoma cases overall, there are positives, the study noted, including new therapies over the last several years that have improved survival outcomes for patients with spreading melanoma.

The falling number of cases among younger people encourages continuing efforts to protect against UV exposure.

"That doesn't mean that people should take it for granted," Chapas said. "They should continue to get their regular check-up and use their SPF 30 daily as well as using sun-protective clothing when they are going to be exposed to bright sunlight."