ABN Amro's $21bn (£11.5bn) sale of its LaSalle unit to Bank of America was lawful, the Dutch Supreme Court says.
The sale of LaSalle was frozen by the Commercial Court in May
Some shareholders had tried to have the sale stopped on the grounds that ABN had not sought their approval first.
The ruling is good news for Barclays Bank, which made an offer for ABN dependent on LaSalle being sold.
Meanwhile a consortium led by RBS said it would go ahead with a revised offer for ABN Amro "on materially superior terms to Barclays' proposed offer".
RBS also said its new offer would "not be conditional upon LaSalle remaining part of the ABN AMRO group".
Some ABN shareholders had been claiming to the court that the LaSalle sale was intended to block an offer from the RBS-led consortium, which also includes Santander and Fortis.
Shares in ABN Amro, Barclays and RBS, the three main protagonists in Europe's largest banking tussle, all rose after the ruling was announced.
Analysts said this reflected the fact that although the judgment was positive for Barclays, it was by no means certain that it would prevail in the bid battle.
ABN has backed Barclays' 62.8bn euro ($85.3bn; £42.5bn) offer.
But Dutch group VEB, which represents small shareholders in ABN, argued LaSalle's planned sale to Bank of America effectively blocked a higher 71bn-euro bid from RBS and its partners, Spain's Santander and Belgium's Fortis, as their offer hinges on LaSalle not being sold.
The Dutch Commercial Court initially ruled in favour of the shareholders' group, preventing the LaSalle transaction.
The ruling boosts Barclays boss John Varley in the battle for ABN
But the advocate general, in his advice to the Supreme Court last month, disagreed and the Supreme Court upheld his view.
"The fact that the shareholders aim at selling their shares at the highest possible price involves no obligation for the board of directors of ABN Amro to obtain the shareholders' approval for the sale of LaSalle," the ruling stated.
"There should not be any unnecessary uncertainty about the carrying out of this agreement, into which the directors of ABN Amro were entitled to enter," it added.
Bank of America said it was "satisfied" with the ruling and would now look to complete the deal as soon as possible.
Far from admitting defeat, VEB said it believed it would ultimately succeed in forcing ABN Amro to consider the two bids on their financial merits.
"They may have won this battle but they will lose the war," said its director Peter Paul de Vries.
"I don't think the Barclays bid will be interesting for many shareholders because it is billions of euros lower than the alternative."
Analysts believe the RBS consortium could return with a fresh offer for ABN Amro, excluding the LaSalle business.
Whichever of Barclays or the RBS consortium eventually wins control of ABN, the deal will create one of the world's largest banking groups.