Mitsubishi UFJ and Sumitomo Trust reached a 2.5 billion yen settlement Tuesday in a dispute over a failed merger, ending a two-year court battle between two of the country's largest banking groups.

"The lawsuits has been settled peacefully and totally," Mitsubishi UFJ Financial Group said in a statement.

Sumitomo Trust & Banking Co. had been squabbling with the former UFJ Holdings for the latter's decision to back out of a planned alliance and merging with another bank instead. The two had agreed on a broad tieup under which Sumitomo Trust would take over UFJ's trust banking operations.

UFJ scrapped that agreement and merged last year with Mitsubishi Tokyo Financial Group Inc. to form Mitsubishi UFJ Financial Group, Japan's biggest bank by assets and market capitalization.

Sumitomo Trust had been seeking a court injunction to halt the negotiations between UFJ and Mitsubishi Tokyo since 2004, arguing the merger violated Sumitomo's earlier agreement with UFJ. When that failed, it filed a lawsuit demanding the merger be stopped. The Supreme Court ruled in favor of UFJ.

In February, Sumitomo Trust filed a damages suit with the Tokyo District Court demanding 100 billion yen in compensation.

Both sides later agreed to court-led arbitration to avoid damaging their reputations in a lengthy court battle.

Sumitomo Mitsui, UFJ and Mitsubishi Tokyo were three of the old "Big Four" banking groups.

Over the past decade the industry consolidated through a wave of mergers and alliances as banks struggled under the weight of bad debts and the long economic slowdown.