Palm

(PALM)

will pay

Xerox

(XRX) - Get Report

$22.5 million to settle a long-running patent dispute, the companies announced on Wednesday.

Under the agreement which will settle a suit filed by Xerox in 1997, Palm will license three Xerox patents and the companies agreed not to sue each other for seven years over patent infringement. The agreement covers not only Palm but spinoff PalmSource, now a subsidiary of

Access

, and former parent company

3Com

(COMS)

, each of which will be dismissed from the suit and will be granted licenses to the Xerox patents.

In the suit, Xerox had charged that Palm's handwriting recognition software, called Graffiti, violated its patents on similar technology. After a setback in the case, Palm discontinued using Graffiti and replaced it with a substitute handwriting system. In the latest round of the suit, the parties gave oral arguments to the Court of Appeals for the Federal Circuit in April.

Palm will account for the settlement as a charge in its fourth-quarter results, which it will report on Thursday.

Following the announcement, Palm's stock was off 29 cents, or about 1.6%, to $18.03 in recent trading, while Xerox's stock was up 7 cents, or 0.5%, to $13.36.