WASHINGTON (CN) – Cigarette manufacturers must begin posting new warnings starting in June about the dangers of smoking on websites and product packaging, a federal judge ruled Tuesday.

In the 31-page order, U.S. District Judge Paul Friedman said the “corrective statements” cigarette makers apply to their websites and packaging must appear for two weeks at a time and for a period of 12 weeks over the next two years.

In addition, Friedman said, new permanent warnings must appear on cigarette packs by November.

The order stems from a 1999 lawsuit which sought to hold companies accountable for producing and marketing a known addictive and dangerous substance.

The resulting settlement mandated a wide-ranging public education effort intended to alert consumers to the dangers of smoking and exposure to secondhand smoke.

In a statement released after television and print advertisements complying with the settlement began appearing last year, Murray Garnick of the Altria Group said the cigarette industry is one of the most heavily regulated in the country, and that his company is working hard to meet “society’s expectations of a responsible company.”

Altria, one of the defendants in the tobacco litigation, is one of the world’s largest producers of cigarettes, tobacco and related products.

Garnick, the company’s general counsel, said being responsible includes communicating openly about the health effects of our products, continuing to support cessation efforts, helping reduce underage tobacco use and developing potentially reduced-risk products.”

“We’re focused on the future and … working to develop less risky tobacco products,” he said.

Several nonprofits, including the American Cancer Society, the American Heart Association and American Lung Association, were plaintiffs in the lawsuit.

In a statement released following the publication of Friedman’s order, the groups praised the progress the courts have made in warning the public of the dangers of smoking.

“Make no mistake: The tobacco companies are not making these statements voluntarily or because of a legal settlement,” the statement said, adding that the tobacco industry is responsible for “a staggering number of deaths per year, an immeasurable amount of human suffering and economic loss, and a profound burden on our national health care system”

According to a study from the Campaign for Tobacco-Free Kids, another plaintiff in the suit, tobacco use kills about 480,000 Americans every year. The healthcare cost of treating those who smokes is about $170 billion. the study said.