HARRISBURG - Merck & Co. Inc. has agreed to pay $58 million as part of a multistate settlement of allegations that its ads for the once-popular painkiller Vioxx deceptively played down the health risks.

The agreement announced yesterday also calls for Merck to submit all new TV commercials for its drugs to the U.S. Food and Drug Administration for review.

The civil settlement ends investigations by 29 states - including Pennsylvania and New Jersey - and the District of Columbia into Merck's advertising practices involving Vioxx, Pennsylvania Attorney General Tom Corbett said.

Vioxx was taken off the market in 2004 after research showed it doubled the risk of heart attacks and strokes. That triggered thousands of lawsuits against Merck, of Whitehouse Station, N.J., which also has major operations in the Philadelphia area. A pending $4.85 billion settlement would end the bulk of those personal-injury suits.

Thanks to aggressive marketing through direct-to-consumer TV ads begun in 1999, hundreds of thousands of consumers demanded Vioxx prescriptions before doctors had a chance to understand the side effects, Corbett said.

"Consumers need clear information about the risks associated with prescription drugs so that they can make well-informed decisions about their health care," Corbett said.

The agreement calls for Merck, for seven years, to submit all new TV commercials for its drugs to the FDA for review and follow through with any changes the agency recommends before showing them. Additionally, for 10 years, Merck must comply with any FDA recommendations to delay TV advertising for newly approved pain medications.

The FDA does not require drug companies to submit advertisements for advance approval except in cases where it has pursued enforcement actions over false and misleading claims, agency spokeswoman Rita Chappelle said.

Merck is also prohibited from "ghostwriting," in which people who worked for the company or were otherwise connected to it allegedly wrote positive articles and studies about Vioxx, Corbett said.

Merck is not admitting any wrongdoing under the settlement and defended its marketing of Vioxx in a statement yesterday.

"Today's agreement enables Merck to put this matter behind us and focus on what Merck does best, developing new medicines," said Bruce Kuhlik, Merck's executive vice president and general counsel.

Corbett's spokesman, Kevin Harley, said the settlement did not require approval by any court.

Most of the settlement cost will be covered by a $55 million pretax charge that Merck said it took in the first quarter.

Pennsylvania officials could not immediately provide a breakdown of how the $58 million would be divided.

In February, Merck agreed to pay $671 million to settle allegations that it overcharged the government for Vioxx and three other popular drugs and bribed doctors to prescribe its drugs. The announcement by federal prosecutors was one of the biggest U.S. health-care-fraud settlements ever.