Merck & Co., the big drugmaker, agreed to a $20 million settlement yesterday with federal and state environmental officials and the U.S. attorney's office over an illegal June 2006 chemical release into a Montgomery County sewer system.

Under terms of the deal, Merck will pay $4.5 million to the state Department of Environmental Protection and $4.5 million to the U.S. Environmental Protection Agency, and will invest $10 million for plant upgrades at the company's West Point manufacturing facility.

Merck also agreed to pay more than $1.5 million in fines to state and federal agencies for violating various environmental laws.

In a statement released by the company yesterday, Merck said it regretted the "unfortunate accident" and it took "full responsibility" for it, adding that it felt the settlement was "fair."

Federal and state officials hailed the agreement.

"This settlement says to every company that discharges dangerous chemicals as part of its operations that it is accountable to the environment and to the community," said U.S. Attorney Patrick Meehan.

"The spill of dangerous chemicals last year left its mark on communities and waterways from Upper Gwynedd Township all the way to Philadelphia," said DEP Secretary Kathleen McGinty, adding that she was pleased that Merck had agreed to upgrade environmental operations.

In June 2006, Merck released potassium thiocyanate into the lower sewer system. The compound passed through the disinfection process at Upper Gwynedd Township's sewage-treatment facility, where it combined with chlorine to form a deadly cyanide compound.

The discharge made its way into the Wissahickon Creek, where it killed more than 1,000 fish, then into the Schuylkill, where it impacted drinking-water operations and recreation in Philadelphia for days.

As part of the settlement, Merck agreed to undertake three major upgrades at its West Point plant to increase storage capacity, to better intercept spills and to institute a chemical-inventory-tracking system.

State officials said they would use the $4.5 million Merck has agreed to pay them to buy and preserve about 100 acres of undeveloped land within the Wissahickon watershed.

As part of its settlement with the EPA, Merck said it would contribute a portion of the $4.5 million to develop a drinking-water early-warning system for the city's Queen Lane plant in cooperation with the Philadelphia Water Department and implement practices to improve the Wissahickon Creek's water quality. *