CHICAGO, MAY 13 -- An eight-year legal battle abruptly ended today when the manufacturer of the pain-killing drug Tylenol reached an out-of-court settlement with families of seven people who died after taking Tylenol capsules laced with cyanide in 1982.

The settlement, terms of which were not disclosed, was announced by Cook County Circuit Court Judge Warren D. Wolfson just as jury selection was to begin in the civil suit against the giant drug company Johnson & Johnson and its wholly owned subsidiary, McNeil Consumer Products Co., which manufactures Tylenol.

It was not clear why the amounts of money involved in the seven separate settlements were not made public.

Bruce Pfaff, one of several lawyers representing the families, said that both sides in the dispute asked Wolfson at a hearing this afternoon to keep secret the amounts and that the judge agreed, ruling that disclosure of the settlement terms could have "an adverse impact on public health and well-being." Pfaff refused to elaborate.

Pfaff said each of the settlement amounts was different and included provisions to pay for the college educations of eight minor children of the victims.

At Johnson & Johnson headquarters in New Brunswick, N.J., Robert Kniffin, a company spokesman, issued this statement: "Though there is no way we could have anticipated a criminal tampering with our product or prevented it, we wanted to do something for the families and finally get this tragic event behind us."

Kniffin said the settlement involved no admission of culpability by Johnson & Johnson or McNeil Consumer Products. Asked why a settlement was not reached until the case was about to go to trial, he said, "We reached settlement as soon as we could."

Pfaff said Johnson & Johnson made its first settlement offer within the last week.

Shortly after legal proceedings began in the mid 1980s, McNeil obtained a protective court order allowing it to keep certain documents and pretrial testimony secret unless the case went to trial. Today's settlement assured that those documents will remain secret.

Pfaff said this might have been a factor in McNeil's decision to settle, although he added that none of the information that will remain sealed was "a smoking-gun kind of document."

"I don't know why they settled," he said.

The victims, who ranged in age from a girl, 12, to a female flight attendant, 35, and included two brothers in their twenties, died between Sept. 29 and Oct. 2, 1982. Their families, all from the Chicago area, filed suit in 1983.

After the deaths, Johnson & Johnson recalled 22 million bottles of Tylenol capsules. The deaths led to major packaging changes for over-the-counter drugs, including introduction of tamper-resistant packages and "caplets," which unlike capsules cannot be taken apart.

In their lawsuits, the families contended Johnson & Johnson and McNeil were negligent and should have known and warned consumers on packaging that capsules were vulnerable to tampering. The company argued it could not have anticipated or prevented the deadly tampering.

No one has been charged in connection with the seven deaths, but in 1986 James Lewis, a tax consultant, was sentenced to a 10-year federal prison term for sending an extortion letter to Johnson & Johnson after the poisonings.

Special correspondent Lauren Ina contributed to this report.