By Margit Feher

BUDAPEST--OTP Bank Nyrt. (OTP.BU), Hungary's largest bank by assets and market share, posted Thursday a 21% rise in third-quarter net profit from a year earlier as the result of foreign subsidiaries offset a fall in profit at the bank's core Hungarian operation.

Consolidated net profit was 42.54 billion forints ($189.65 million) in the third quarter, compared with HUF35.17 billion a year earlier, well above the HUF39.7 billion profit forecast in a poll of 22 analysts provided by the company. That translated into earnings of HUF159 a share, up from HUF132 a year earlier.

Banking in Hungary has come under pressure due in part to a hefty banking-sector tax as well as a late-2010 government program that eroded banks' profitability. OTP booked all of the banking tax for 2012 in a lump sum in the first quarter, leaving the most recent quarter unburdened by the levy.

Banks and homeowners in Hungary are also dealing with the effects of foreign-currency mortgages. Banks were asked to shoulder the cost of a government program designed to help foreign currency borrowers who took out loans, mostly in Swiss francs, and ran into trouble as the franc's big gains pushed up the costs of their forint-denominated loans. Other factors weighing on the Hungarian portfolio were the recessionary economic environment and a high unemployment there. Facing difficulties in their finances, both Hungarian households and companies have been trying to reduce their loans.

The deterioration of OTP's Hungarian loan-portfolio quality was the slowest in the third quarter since the onset of the economic crisis, the bank said. Its mortgage-loan-portfolio deterioration moderated remarkably and its portfolio of loans to large companies improved quarter-on-quarter in Hungary. Its loan-loss provisions still were 12% higher than a year earlier.

For the first time this year, OTP saw an increase in lending in Hungary to middle and large-size companies although the growth rate was moderate, it said. Lending to micro and small firms continued to expand at a more dynamic rate.

Consolidated loan-loss provisions and risk costs fell by 5% to HUF60.57 billion from the previous quarter but were still up 10% at HUF183.41 billion in the first nine months of this year versus the same period of last year.

OTP's foreign subsidiaries' results helped the group-level bottom line, with Russian and Bulgarian operations the key contributors, while Serbian and Montenegrin operations gradually narrowed their losses. Units in Ukraine and Romania turned into red.

OTP's shares closed up 1.7% Wednesday at HUF4,166 while the exchange's benchmark BUX index closed 0.6% higher.

Write to Margit Feher at margit.feher@dowjones.com