International Business Machines Corp. said yesterday that it agreed to settle most of the issues in a lawsuit over changes in its pension plans on terms that allow the company to continue to appeal a key question while capping its liability at $1.7 billion.

Under the deal, which must be approved by a federal judge in Illinois, the company agreed to pay $300 million to settle issues involving an earlier pension that the company established in the mid-1990s. It also agreed to pay a total of $1.4 billion if it loses an appeal on the question of whether its so-called cash-balance plan is age-discriminatory, as the judge in the case ruled.

"IBM continues to believe its pension plan is fair and lawful," and agreeing to a settlement was "a practical business decision," Jesse J. Greene Jr., an IBM vice president and treasurer said in a webcast. With IBM's total liabilities capped, even if the company loses the appeal, "based on our financial condition today, the remedies are within IBM's ability to handle," he said.

Douglas R. Sprong, an attorney for the IBM employees who sued over the pension plan, said in a written statement that they believe the amount of the settlement "compares favorably" to the benefits they would likely receive if they won in court. "For that reason," he said, "it is clearly in the best interests" of the workers.

Cash-balance plans, which tend to provide better benefits for short-service workers while paying longtime workers less, have become popular with employers since the late 1990s. Employers argue that they fit today's workplace since employees are likely to change jobs often. Workers charge that conversions are frequently used to conceal benefit cuts, and older workers end up with far lower pensions than they planned.

The dispute has reached Congress, which has several times forbidden the Treasury Department to write rules approving cash-balance plans.

Chief District Judge G. Patrick Murphy of the Southern District of Illinois ruled last year that the company violated workers' rights in two pension conversions it carried out during the 1990s, the second of which placed many workers into a cash-balance plan. The conversion allowed older workers to stay in the old plan, but many who had no choice were unhappy.

A group of workers sued, charging that, among other things, that the cash-balance plan formula is inherently discriminatory. Murphy ruled for the plaintiffs on the grounds that if a younger worker and an older worker started at the same time and left the company at the same time, the younger worker would end up with a larger benefit by age 65. The law holds that a plan cannot provide a lower benefit to someone because of his or her age.

Greene said no other court has ruled that way and that Murphy's ruling "has ramifications far beyond IBM -- as [it] potentially invalidates over 1,200 U.S. cash-balance and related plans."

He said IBM will record a $320 million charge, 13 cents a share, for the third quarter, which would also cover an earlier settlement of another issue in the case.