It sounds like a whopper of a fish story: A chemical spill that kills 1,000 minnows, shuts down Wissahickon Creek to anglers and swimmers and creates a drinking-water scare for Philadelphia winds up pouring nearly $5 million into a fund to save an endangered Montgomery County estate.

But this tale is true, and its happy ending will be the purchase in February of a 98-acre portion of Erdenheim Farm in Whitemarsh, a property that has been described as this region's Central Park.

Announced on Thursday, the donation by Merck & Co. Inc. is part of a $20 million-plus settlement that the pharmaceutical firm reached with federal and state environmental agencies over the mishap at its Upper Gwynedd plant on June 13, 2006. It brings preservationists within $415,000 of the $14.5 million needed to buy the long-coveted Angus Tract at the 450-acre estate of the late philanthropist F. Eugene "Fitz" Dixon Jr.

Although declining to name the source, raising the rest of the money "is not going to be problematic," said Kimberly G. Sheppard, executive director of the Whitemarsh Foundation. Formed seven years ago with the goal of protecting Erdenheim Farm, the group has been working with the Media-based Natural Lands Trust to purchase the Angus Tract.

"Good things happen to good projects," Sheppard said. "This is a silver lining out of an unfortunate situation."

The foundation's original purchase option was to expire at the end of this month. But because the group had gotten so close to its fund-raising target, the Dixon estate extended that deadline to February, when the deal is expected.

The Merck plant, which produces childhood vaccines, is a little more than nine miles from Erdenheim Farm. The Wissahickon runs through the $70-million estate.

Merck is represented by an attorney who has voiced his support for the preservation of the property. Last spring, Kenneth J. Warren, chairman of environmental and land-use law at the Philadelphia-based firm of Wolf Block, contacted another Erdenheim admirer, State Rep. Mike Gerber (D., Montgomery), whose district includes the farm.

By then, Merck was in settlement talks with the U.S. Justice Department and Environmental Protection Agency, and the state Department of Environmental Protection. Warren was aware of Gerber's attempts to attract funding for the purchase of the Angus Tract.

"Very luckily, [Warren] called me on the phone and said, 'Mike, do you think you'd want four-and-a-half to five million bucks?' " Gerber recalled yesterday.

The lawmaker - whose grandfather, the late Morris Gerber, was a county judge and a close friend of Fitz Dixon - promptly hooked Warren up with Whitemarsh Foundation officials. "I really just sort of played a small matchmaking role," Gerber said.

Foundation leaders took it from there. When it has come to Erdenheim and fund-raising, getting donors to reach into their pockets usually has required little more than a tour of the farm.

During last spring and summer, Sheppard and the foundation's chairman, Hugh Moulton, gave Merck representatives an up-close view of the grazing Black Angus cattle and the stream that bisects a 117-acre tract already owned by Natural Lands Trust.

The Merck settlement includes an additional $1.7 million to help create wetlands and a riparian buffer along the creek. Another $1.2 million from the company will be spent on stream-bank restoration.

Eager to share the limelight, Warren yesterday described Erdenheim Farm as "a very important environmental asset" but wanted Merck to speak for itself.

Connie Wickersham, a Merck spokeswoman, said company officials were "very grateful" that Warren had alerted them to the Dixon estate preservation effort. A resident of Warrington, Bucks County, Wickersham got her first glimpse of the farm during the tour.

"We got up on the highest point and looked down on that land - it was just breathtaking," she said. Merck is "so excited that out of this awful, horrible, unintentional accident such good could come."

The foundation must now amass an endowment for property maintenance, an estimated $100,000 annually to open the tract to the public and continue farming it, according to Moulton.

By then, another much-desired parcel, the 108-acre Sheep Tract, may be on the market, he said.

The $14 million raised so far has come from an array of private contributors, as well as state, county and local government. Moulton is confident the money will keep flowing.

"I think," he said, "the momentum is there.