Talks between two Japanese megabanks aimed at a merger that would create the world's biggest bank ran into a major obstacle Tuesday when a Tokyo court demanded the talks be scrapped.

The Tokyo District Court decision to stop discussions between UFJ Holdings Inc., Japan's fourth-biggest banking group, and larger rival Mitsubishi Tokyo Financial Group Inc. was in response to a request by Sumitomo Trust shortly after the merger proposal was announced earlier this month. Sumitomo Trust earlier had agreed to buy UFJ's trust banking operations, and contended that the merger talks violated its agreement with UFJ.

UFJ said it will fight the order. Under Japanese law, the court listens to any objections and then generally gives another decision. The case could move to a higher court if it is not resolved at the district level.

UFJ and Mitsubishi Tokyo, two of Japan's "Big Four" banking giants, announced July 16 that they were formally in merger talks targeting a basic agreement by the end of the month to try to merge by September 2005.

With combined total assets of about $1.7 trillion, UFJ and Mitsubishi Tokyo would create the world's largest bank by assets, surpassing Citigroup Inc.'s $1.19 trillion.

The move by the banks underlines a streamlining trend in Japan's long-struggling financial system. All of the Big Four, which also includes Mizuho Financial Group and Sumitomo Mitsui, were formed in recent years through mergers.

Although analysts and the Tokyo stock market have generally welcomed the possible merger as a stabilizing force for Japan's overall financial system, fears remain about the health of UFJ's books.

UFJ is saddled with troubled borrowers such as giant retailer Daiei. It has also been reprimanded by the Financial Services Agency for being evasive during regulatory inspections.

And the sheer size of such a merger is likely to be filled with problems, from clashes of corporate cultures to the simple task of linking computer systems.

But the combination of UFJ's strengths in the retail market and regions outside Tokyo with Mitsubishi Tokyo's reputed international operations and major Japanese corporate clients is expected to be a positive complement.

The other three Big Four banks were profitable in the fiscal year ended March 31, but ballooning bad debts kept UFJ Holdings in the red and forced its top executives to step down. UFJ reported a loss of $3.7 billion for the latest fiscal year.

Businessmen pass UFJ Holdings' Tokyo headquarters. Japan's fourth-largest banking group was holding merger talks with Mitsubishi Tokyo Financial.