Cancer has topped heart disease as the biggest killer in some of the world's richest countries, a new study found.

Though heart disease remains the primary cause of death globally — accounting for 40 percent of all deaths —  cancer has overtaken heart disease in middle- and high-income countries such as Sweden, Canada, Chile, Argentina, Poland, and Turkey, according to a study published Tuesday in The Lancet, a medical journal.

Cancer in high-income countries kills twice as many people as heart disease, the study found. And if trends continue, researchers argue, cancer could become the leading cause of death worldwide in a matter of decades.

MAN DIAGNOSED WITH RARE SYPHILIS INFECTION IN BRAIN AFTER STRUGGLING TO WALK, TALK

For the study, researchers analyzed data on diseases and death among 162,534 adults aged 35 to 70 from 21 countries across five continents from the Prospective Urban Rural Epidemiology (PURE) from 2005 to 2016.

The countries where the participants were from were divided into three sections — low-income, middle-income, and high-income. Low-income countries included: Tanzania, Bangladesh, India, Pakistan, and Zimbabwe. Middle-income countries consisted of Iran, South Africa, Philippines, Colombia, China, Brazil, Malaysia, Turkey, Poland, Argentina, and Chile. And the richest countries included Saudi Arabia, the United Arab Emirates, Sweden, and Canada.

Though one of the world's wealthiest countries, the United States was not involved in the study.

In middle- and high-income countries, medicines to treat and prevent heart disease may be behind the decline in the number of cardiovascular disease-related deaths.

“The number of deaths associated with cardiovascular disease has decreased, particularly in [high-income countries], because of the implementation of preventive and therapeutic measures," said the report.

ILLINOIS BABY HAS 5-INCH TUMOR REMOVED FROM NECK HOURS AFTER BIRTH

The same is not true for cancer-related deaths because there have been fewer effective therapies for preventing and treating cancer, researchers said.

“The high rates of cardiovascular disease and related mortality in low-income countries are likely related to gaps in access to, or availability of, healthcare. This was shown by the lower use of preventive medications and less frequent hospitalization for cardiovascular disease. Improving access to quality healthcare is key to reducing deaths from cardiovascular and other diseases in low- and middle-income countries,” Professor Salim Yusuf, senior author of the study and Principal Investigator of PURE, said in a statement.

“As cardiovascular disease declines in many countries, cancer mortality is likely to become the leading cause of death in the future,” he added.

Fox Business' Jeanette Settembre contributed to this report.