SMITHFIELD, VA. -- Smithfield Foods Inc. has agreed to pay $639,000 in fines and legal fees as part of a settlement with two environmental groups, ending the company's seven-year battle over pollution of the Pagan River.

The settlement is considerably less than $1.2 million ordered by a federal court in 1985 for discharges from the meatpacker's Gwaltney of Smithfield packing plant.

"The penalties were substantially reduced," Judith W. Crenshaw, a spokeswoman for the Chesapeake Bay Foundation, said last week. "It was not as big a splash as it originally appeared to be."

The settlement was signed by U.S. District Judge Robert R. Merhige Jr. in Richmond.

Aaron D. Trub, the company's vice president and secretary-treasurer, said Smithfield has agreed to pay $289,000 in fines, $300,000 in plaintiffs' legal fees, $10,000 in interest to the U.S. Department of Justice, and $40,000 to the Virginia Institute of Marine Science.

The Chesapeake Bay Foundation and the Natural Resources Defense Council sued Smithfield in October 1983 under provisions of the federal Clean Water Act that allows private citizens to sue companies for polluting the nation's water supply.

The two groups alleged Smithfield dumped excessive amounts of chlorine and nitrogen into the Pagan River.

Merhige found the company guilty of the dumping and fined it $1.2 million, a record under the provisions of the Clean Water Act.

Smithfield appealed the ruling and the fines to the U.S. Supreme Court.

The Supreme Court referred the matter back to the lower courts after ruling the company could not be fined for the chlorine discharge because the company was not in violation of its state permit at the time of the suit.

Merhige again levied the $1.2 million fine, but the 4th U.S. Circuit Court of Appeals upheld only $289,000 of the fine.

According to the company's year-end financial report released Monday, the litigation cost the company a total of $1.14 million, including its legal costs.