UBS said Tuesday it intends to seek full compensation for losses it says it suffered from the "gross mishandling of Facebook's market debut" by Nasdaq OMX Group.

The Swiss financial services firm pegged its loss at 349 million Swiss francs, the equivalent of $357 million, from the botched handling on May 18 of the Facebook initial offering of stock to the public on the Nasdaq IPO Cross system and the Nasdaq Stock Market.

That turned what would have been a profit at UBS' Investment Bank in the second quarter, into a pre-tax loss of 130 million Swiss frances or $133 million.

Nasdaq exposed UBS, as a market maker, to "far more shares than our clients had ordered,'' by filling orders multiple times, chairman Axel A. Weber and chief executive Sergio P. Ermotti told shareholders.

Here's their account, from a letter to shareholders:

As a market maker in one of the largest IPOs in US history, we received significant orders from clients, including clients of our wealth management businesses.

Due to multiple operational failures by NASDAQ, UBS's pre-market orders were not confirmed for several hours after the stock had commenced trading. As a result of system protocols that we had designed to ensure our clients' orders were filled consistent with regulatory guidelines and our own standards, orders were entered multiple times before the necessary confirmations from NASDAQ were received and our systems were able to process them. NASDAQ ultimately filled all of these orders, exposing UBS to far more shares than our clients had ordered. UBS's loss resulted from NASDAQ's multiple failures to carry out its obligations, including both opening the Facebook stock for trading and not halting trading in the stock during the day. ''

The company said it "will take appropriate legal action against NASDAQ to address its gross mishandling of the offering and its substantial failures to perform its duties.'' UBS will "pursue compensation for the full extent of our losses,'' which it pegged at $357 million.

That amount dwarfs the entire "voluntary compensation plan'' that Nasdaq has said it will follow to make market makers and other parties whole from the Facebook fiasco.

That plan now totals $62 million - after Nasdaq boosted the amount $22 million 10 days ago.

Nasdaq OMX last week said that its revenues less transaction rebates, brokerage, clearance and exchange fees for the second quarter totaled $424 million. Its net income for the quarter was $93 million.

Two weeks ago, Knight Capital Group, another market maker, said it took a $35.4 million pre-tax charge against earnings in its second quarter, due to the delayed and confused opening of trading of Facebook shares.

The charge cut Knight's net income to $3.3 million in the quarter, down from $17.6 million.

"We are evaluating all legal rights and remedies in connection with the Facebook IPO,'' chairman and chief executive Thomas M. Joyce also said, at the time.