UBS, reporting a 15 percent net profit rise, revealed that in July it had settled a tax dispute in the German state of North Rhine-Westphalia with a payment of more than 300 million euros ($403 million).
The payment follows investigations of UBS clients suspected of using the bank to evade taxes. The bank is also being investigated in the German region of Baden-Wurtenberg.
German authorities acted at the end of 2012 after buying a CD disc containing account details stolen in Switzerland in a move which caused tension between the two countries.
This came as many governments hit by the financial crisis were clamping down on cross-border tax evasion.
Large parts of the Swiss banking industry are having to adapt to a new environment of reduced banking secrecy.
Germany is an important market for UBS, which said that more than 95 percent of its German customers had provided proof either that their taxes were in order or that they were coming clean to the authorities.
UBS said that it had made a provision of 120 million francs ($133 million) for the dispute in Germany and overall had put aside 254 million francs ($265 million) for litigation and disputes.
Last week, UBS was put under investigation in Paris on allegations of laundering money from tax evasion and was ordered to post bail of 1.1 billion euros.
The bank said then that the case was politically motivated and that it would appeal against the size of the bail.
Stark risks of litigation
The bank highlighted the risks to banks over such tax and other regulatory cases, referring to "enforcement matters".
This was an indirect reference to legal action and fines, notably in the United States, against various financial institutions accused of helping clients avoid tax or being complicit in other illicit transactions.
These cases "starkly" illustrated risks to banks' reputations, UBS said.
"We are subject to a large number of claims, disputes, legal proceedings and government investigations and expect that our operations will continue to give rise to such proceedings in the future."
The impact could "substantially exceed the level of provisions that we have established," the bank added.
UBS also said that it had received requests for information from the US Security and Exchange Commission (SEC), the US market regulator, about its alternative trading system known in dealing room jargon as "dark pool" operations.
UBS said it was cooperating on this.
It had also received requests from the New York prosecutor, and from the US independent securities regulator FINRA.
The bank is one of some 12 financial institutions targeted in court by other share traders, who allege so-called high-frequency trading by UBS and others had prejudiced other market participants.
Strong inflow of funds
The bank said in the second quarter of the year net profit was 792 million francs ($874 million), up 15 percent from last year.
Analysts polled by the AWP financial news agency had expected about 715 million francs.
But wealth-management activities disappointed, with a net figure of 393 million euros, owing to provisions for litigation.
The bank said that excluding the charge, the division had done well, attracting net new funds of 10.7 billion francs ($11.8 billion).
UBS shares rose 0.66 percent to 16.73 francs in morning trading. The overall SMI index was up 0.23 percent.
Vontobel analyst Andreas Venditti said: "Net new money in wealth management was very strong while the gross margin was rather weak — the same trend as seen at other peers.
"Litigation will remain a general issue for the banking sector for some time," he added.