UBS said its second-quarter profit beat forecasts, even after an 835 million Swiss franc charge to settle a US lawsuit and other matters, and that its flagship private bank was continuing to win new customers.

The private bank, which attracted the most customer money in six years in the first quarter, is the centrepiece of UBS's drive to recover from the financial crisis.

The firm had previously sold large parts of its fixed income business and cut 10,000 jobs.

The Swiss bank said its second-quarter net profit rose to 690 million francs from 425 million in the same period last year, compared with some analysts' forecasts which were closer to 560 million.

It did not provide a break-down of the profit, with detailed results due on July 30.

However, UBS said its private bank attracted 10.1 billion francs of new money and its US-based brokerage attracted 2.7 billion, although its asset management arm suffered 2 billion francs in outflows.

"The earnings are quite a bit a better than expected, capital also looks good, and net new money at the private banks surpassed our estimates," Zuercher Kantonalbank analyst Andreas Venditti said.

He has an "overweight" rating on the stock.

At 7.45am Irish time, UBS shares were up 3.4% at 18.2 francs, one of the biggest rises by a European blue-chip stock.

UBS's strong private banking performance contrasted with that of Swiss rival Julius Baer, which missed new money targets but beat profit views.

UBS said the 835 million franc charge included the cost of settling a US Federal Housing Finance Agency lawsuit over soured mortgage investments. It did not disclose details of the settlement.

The FHFA regulates US mortgage finance companies Fannie Mae and Freddie Mac after they were placed into federal conservatorship at the height of the 2008 financial crisis.

It is suing a string of major banks, accusing them of violating securities laws by misleading Fannie Mae and Freddie Mac about $200 billion in mortgage-backed securities they purchased.

The charge is likely to also include 100 million francs UBS recently disclosed as part of a withholding tax agreement between Switzerland and the UK, which came into force this year.

Under a deal signed on 1 January, Swiss banks paid 500 million francs to Britain, which they will only receive back in full if their UK-resident clients pay at least 1.3 billion francs through the scheme, rather than direct to Britain.

Bank Vontobel said the results indicate UBS is on track to reinvent itself following a state bailout in 2008 and a series of scandals, including a $1.5 billion penalty for manipulating Libor and other benchmark interest rates.

"This further lends credibility to our investment case based on a strong wealth management franchise and strong capitalisation enabling juicy dividend payouts in the years to come," said Bank Vontobel analyst Teresa Nielsen. She rates the stock as a "buy" with a 19 franc target price.

UBS halted dividend payouts following its 2008 bailout by the Swiss government, and has paid only modest symbolic shareholder payouts in the last two years.

Private banks like UBS and Baer are spending far more to vet new clients as regulators get tough on firms that harbour tax cheats and money launderers, which eats into their profit margins.