Xerox Holdings Corp. agreed to sell 25 percent of Fuji Xerox to its Japanese affiliate, discarding its slice of the five-decade-old partnership after an aborted merger.

Fujifilm Holdings Corp. will buy the $2.3 billion stake and own 100 percent of Fuji Xerox, the companies said Tuesday in a statement.

Fujifilm shares jumped 6.7 percent, their biggest gain since February 2018, after the deal was reported by the Wall Street Journal on the Tokyo Stock Exchange before trading was closed.

Since 2018, Xerox, a name synonymous with the copying industry, has been signaling its intention to break ties with its Japanese ally. Forged in 1962, the joint venture of Fuji Xerox was one of the oldest ties between an American and Japanese company.

The deal will bring a two-year saga with a complex merger plan, ouster from a chief executive, several lawsuits, and activist investors Carl Icahn and Darwin Deason to a close.

"Full ownership of Fuji Xerox in a rapidly changing business environment would encourage quicker decision-making," said Shigetaka Komori, Chief Executive Officer of Fujifilm in the release.

After Fuji Xerox becomes a wholly-owned subsidiary, Fujifilm said, the transaction will have a "mid-to-long-term positive impact" on earnings.

The deal to buy Xerox's stake also includes ownership of 51 percent in Xerox International Partners, an original U.S. and Europe supplier of equipment, the companies said.

The original proposal for a merger unveiled in 2018 called on Fuji Xerox to borrow money to purchase Fujifilm's ownership stake, and then Fujifilm to purchase a majority share in Xerox using the money.

The resulting merger would have reduced the original stake of Xerox. But Icahn and Deason, who owned about 15 percent of Xerox at the time and claimed it severely undervalued the company, immediately opposed the deal.

In May 2018, Icahn scored another win when he bagged a bid to oust a former Xerox chief executive officer and shuffle the document solutions company's board.

Fujifilm said after the contract was canceled it would drop the litigation it brought against Xerox last year. Fuji Xerox, which operates as a Fujifilm subsidiary, will continue to supply Xerox after completion of the transaction, said the companies.

The 57-year-old relationship has been a bargaining chip and a challenge in potential deals between the two firms at different times in those months.

During the legal war that occurred after the deal was announced, Icahn urged Jacobson to put the relationship behind as Fuji Xerox reported corrupt accounting practices in New Zealand and Australia in 2017.