UBS was hit hard by the US sub-prime loans collapse
UBS has reported a loss of 1.4bn Swiss francs ($1.32bn; £790m) for the April-to-June quarter, along with significant outflows of cash.
The loss is a slight improvement on the 2bn Swiss franc loss the bank made in the first quarter of this year.
The bank said results were "significantly affected" by charges totalling 2.3bn Swiss francs.
In contrast, French bank BNP Paribas posted a profit of 1.6bn euros ($2.3bn; £1.36bn) for the second quarter.
This represents a small rise on the 1.5bn euros recorded for the same period a year earlier.
Revenue was 10bn euros, up by a third on a year ago.
The bank said it was "well placed to deal with the challenges of the current economic environment".
BNP Paribas chief executive Baudoin Prot said: "We have been gaining market share and we have had the first integration of Fortis, which is a major step forward."
BNP Paribas bought Belgium's Fortis Bank earlier this year.
The loss at UBS, Switzerland's biggest bank, was almost four times bigger than the loss of 358m francs it recorded for the same period last year.
The bank said earnings had been hit by a credit charge of 1.2bn francs, restructuring charges of 582m francs and 492m francs incurred in relation to the sale of UBS Pactual, the bank's Brazilian financial services business.
It also failed to stem outflows of money from its wealth management divisions in the three months to the end of June.
It reported outflows of 17.1bn Swiss francs from its Global Asset Management division and 16.5bn Swiss francs from its Wealth Management and Swiss Bank.
Despite the large loss, the bank said it was heading in the right direction.
"While our second-quarter results were clearly unsatisfactory, they show significant progress towards returning profitability and restoring client trust," the bank's bosses said.
The bank also highlighted the fact that it had reduced the risk levels of its overall investments.
However, it did issue a cautious outlook for the coming months, saying a "sustainable recovery is not yet visible".
UBS's results contrast with those of Switzerland's second-biggest bank, Credit Suisse, which reported a second-quarter profit of 1.571bn francs, up 29% from a year earlier.
UBS has been hit particularly hard by the credit crisis, suffering from big losses in the US sub-prime mortgage market.
Its reputation has also been tarnished by a legal battle with US authorities over suspected tax evasion by its US customers.
The US had accused UBS of violating US laws and insisted the Swiss bank reveal the names of US clients who had set up Swiss accounts to evade tax.
But last Friday, the two parties reached an "agreement in principle" in their dispute, meaning the case may not go to court after all.
Analysts say the deal may go some way towards stemming the outflows of cash the bank has experienced in recent months.