TOKYO (AP) _ The Boeing Co. today reached a compensation agreement with the families of 54 victims who died in the 1985 crash of a Japan Airlines Boeing 747 jumbo jet, history's worst single-plane disaster.

The families had sued the U.S. airline manufacturer for a total of $109 million, but under the agreement reached between the two sides, the amount of compensation was not disclosed.

Lawyers for the families said it was ''much higher than that of ordinary traffic accidents.''

The government blamed the Aug. 12, 1985, crash - which killed all but four of 524 people aboard the jet - on improper repairs by Boeing to the plane's rear pressure bulkhead.

It said the bulkhead, at the back of the passenger cabin, ruptured in flight, knocking off part of the rear fin and crippling all four hydraulic systems, leaving the pilots unable to control the plane.

As they tried to make an emergency landing, the plane lurched around violently for 32 minutes before crashing in mountains northwest of Tokyo.

At the Tokyo District Court today, Boeing apologized to the families, who brought the suit against the Seattle-based company in January 1988.

''The settlement was reached today, but our sorrow will only grow and will never cease,'' said Kensuke Ota, 72, whose daughter died in the crash, along with her husband and two children. ''I condemn Boeing and JAL, but I want to lessen my sorrow by today's settlement.''

Boeing said it negotiated ''sincerely'' and believed ''the terms of the settlement are fair. We would like to take this opportunity to renew our determination to maximize our efforts for the safety of airplanes.''

Its repairs on the bulkhead were for damage sustained when the plane skidded on its tail in a minor 1978 accident.

Boeing accepted the results of a Japanese government probe and agreed to pay compensation, but some families sought criminal charges against Boeing engineers, JAL maintenance managers and Transport Ministry officials.

Charges of professional negligence were brought by Japanese police against 12 airline officials in 1988, but problems such as Boeing engineers' refusal to submit to questioning stymied the probe.

Japanese prosecutors dropped the charges in August, when the five-year statute of limitations expired in the case.

The airline said that after today's settlement, compensation for eight of the 505 passenger victims remains to be negotiated.