Washington Mutual Inc said on Friday that it reached a deal that will bring it roughly $6 billion and help resolve its bankruptcy, but it could leave shareholders in the cold.

The company, which is tied to the biggest bank failure in U.S. history, will gain ownership of a bank deposit that is worth about $4 billion. JPMorgan Chase & Co also had claimed the deposit.

It also agreed to split two potential tax refunds worth a combined $5.6 billion with JPMorgan and the Federal Deposit Insurance Corp.

While the transaction brings the three parties into agreement for the first time after 18 months of legal battles, it sets up the next likely fight: the deal depends on the disallowance of billions of dollars in claims by holders of bonds issued by Washington Mutual Bank.

The company recognizes $7 billion in general unsecured claims stemming from Washington Mutual notes, although more than $100 billion of claims have been lodged. The money brought into the estate will go to paying off creditors.

Shareholders also are likely to fight the agreement. An attorney for the official committee of equity holders told the court that nobody told him about the settlement.

Shares of Washington Mutual common stock fell as much as 70 percent after the deal was announced. Preferred shares, which have a higher-priority claim on the company's assets, rose 9 percent.

Shares of JPMorgan were little changed at $43.37 in afternoon trade.

The Seattle-based Washington Mutual filed for bankruptcy in September 2008, during the same financial crisis that felled Lehman Brothers Holding Inc, Merrill Lynch and banks across Europe. Washington Mutual's jittery depositors yanked nearly 10 percent of the bank's $188 billion in deposits in a matter of days, prompting regulators to seize the operation.

After it was seized, the FDIC sold the bank to JPMorgan for $1.9 billion.

Friday's deal will return a bank deposit worth about $4 billion to Washington Mutual, minus $172 million.

The deposit was also claimed by JPMorgan which had described Washington Mutual's bookkeeping as a shell game and said money might have been a capital contribution that allowed the bank to meet regulatory requirements.

The deal also splits the company's two expected tax refunds. Washington Mutual agreed to receive $900 million of a $2.6 billion expected return, with the rest going to JPMorgan. A second $2.6 billion return will be bring in $1.04 billion for Washington Mutual with the rest going to the FDIC.

The company's reorganization plan is really a plan for distributing assets to creditors. Little will remain of the company that was founded in 1889 to help fund the rebuilding of central Seattle after a devastating fire.

Most of what was once 2,200 branches and 40,000 staff as well as books and records are now in the hands of JPMorgan.

The company's seizure and bankruptcy have been steeped in controversy and become fodder for conspiracy theories, particularly among shareholders.

The bank said in court documents that JPMorgan may have leaked information to regulators that led to its collapse. It cited records from other court cases that suggested JPMorgan had planted mole employees at Washington Mutual to glean information.

As part of the agreement, Washington Mutual will not pursue litigation over its collapse against JPMorgan or the FDIC.

The case has also realigned what passes for the natural order of things in bankruptcy, with JPMorgan fighting against hedge funds that hold the company's bonds.

In most other large bankruptcies such as Readers Digest and Tribune Co , JPMorgan has been a tough negotiator on behalf of hedge funds, who it depends on to buy the securitized loans it generates.

The company said it will finalize the agreement and include it in a plan of reorganization it expects to file with the Delaware bankruptcy court by the end of March.

The case is In re Washington Mutual Inc, U.S. Bankruptcy Court, District of Delaware (Wilmington), No. 08-12229.

(Reporting by Tom Hals. Editing by Robert MacMillan)