BUDAPEST (Reuters) - Hungarian banks said on Tuesday that measures requiring them to contribute to a "defence fund" would damage their ability to lend, rejecting government allegations that they had exploited the war in Ukraine to earn extra profits.

The government announced on Monday that it would finance a defence fund by keeping existing windfall taxes on retailers and multinational companies beyond this year instead of phasing them out as earlier expected. It will also tax banks' foreign currency transactions and hike transaction fees.

A surge in inflation partly driven by fuel price rises arising from Western sanctions imposed on Russian energy over Moscow's 2022 invasion of Ukraine led to greater profits for private banks as the central bank - along with others in Europe - pushed up interest rates to contain the trend.

However, the Hungarian Banking Association said in a statement that lenders were not making extra profits as a result of any deliberate business decision prompted by the war in Ukraine, with which eastern Hungary shares a border, and that the planned measures would hurt the banking sector.

"The unpredictability of a series of government burdens and measures severely limits the banking sector's lending capacity, international competitiveness and stimulative role," they said.

Inflation in Hungary far exceeded prices rises elsewhere in the European Union due to soaring energy costs as well as ineffective government interventions to rein in prices, analysts said.

The government imposed windfall taxes on large companies to bolster its budget coffers in 2022. Hungary's budget deficit is well above EU limits, averaging nearly 7% of economic output over the past four years.

Prime Minister Viktor Orban's chief of staff, Gergely Gulyas said that given current "wartime" conditions, a defence fund was needed but he did not elaborate on what the proceeds from the extra levies on company profits would be used for.

(Reporting by Boldizsar Gyori and Anita Komuves; editing by Mark Heinrich)