Updated from 12:42 p.m. EDT:

SunTrust's ( STI) quest to break up a planned merger between Wachovia ( WB) and First Union ( FTU) suffered a big legal setback Friday, as a North Carolina judge refused to nullify a hefty breakup fee.

As part of their friendly merger agreement announced in mid-April, Wachovia and First Union agreed to a breakup provision that would allow First Union to acquire a 19.9% stake in Wachovia, valued at up to $780 million, if the deal did not go through. SunTrust charged that the breakup provision attempted to coerce Wachovia shareholders into voting for the First Union merger. But North Carolina Judge Ben Tennille rejected that argument, saying the court was convinced Wachovia shareholders could make an "uncoerced, fully informed decision" about how to vote.

However, the court did approve a motion by SunTrust to invalidate a nontermination provision that essentially would have barred another company from making an unsolicited bid for Wachovia before January 2002. This helps SunTrust some; if Wachovia does vote against a First Union merger at its shareholder meeting on Aug. 3, it will allow SunTrust to move forward with its hostile bid.

First Union agreed to acquire Wachovia this spring in a stock swap valued at about $14 billion. SunTrust countered with an unsolicited bid that initially offered a 17% premium to the First Union pact. But the premium has since shrunk to about 5% as investors warmed to the idea of a First Union deal and worried about shareholder dilution at SunTrust. For some time now, most observers have expected First Union to carry the day.

"Both sides can claim victory for different reasons today," says Putnam Lovell banks analyst Jennifer Thompson. But she notes that the refusal to nullify the deal's breakup fee is a clear setback for SunTrust, no matter how the bank attempts to spin the news. SunTrust had said if the courts reduced or canceled the $780 million fee, and SunTrust wound up winning the bid for Wachovia, it could share the savings with Wachovia shareholders by adding cash to its current per-share offer. "Basically, that didn't happen," says Thompson. (Putnam Lovell has no underwriting relationship with any of the banks.)

The stocks themselves were little changed by the news. Thursday, SunTrust rose 51 cents to $68.50, Wachovia added 4 cents to $70.04 and First Union edged 9 cents higher to $35.00.

Later Friday afternoon, Institutional Shareholder Services, an influential advisory firm, will issue a recommendation on whether or not Wachovia shareholders should back a merger with First Union.