LONDON — Statins, taken by millions of people worldwide to lower cholesterol and prevent heart disease, increase the risk of cataracts, kidney failure, muscle pain and liver dysfunction, a study of more than 2 million Britons reported Friday. But doctors said the benefits from using the drugs outweighed the risks.

The findings paint a fuller picture of the long-term risks of medications such as Pfizer’s Lipitor, the world’s top-selling drug, and AstraZeneca’s Crestor, the researchers said. The study was released by the British Medical Journal.

The study also confirmed the benefits of the drugs, which generated $35.3 billion worldwide in 2009, according to IMS Health, based in Norwalk, Conn., which tracks pharmaceutical sales. For every 10,000 people taking a statin, there were about 271 fewer cases of heart disease, 8 fewer cases of esophageal cancer, 307 extra patients with cataracts, 23 additional patients with acute kidney failure and 74 extra patients with liver dysfunction, the researchers estimated.

The risks were seen with all the statins, emerged in the first year of use and persisted as long as patients took the medicines, the study found.