* Top court broadly upholds disputed FX loan contract
* OTP's exchange rate spread capped at 1 pct, to be repaid partially
* OTP shares jump on verdict (Adds legal expert, details of ruling, protest)
By Marton Dunai and Krisztina Than
BUDAPEST, July 4 (Reuters) - Hungary's supreme court backed OTP Bank on Thursday in a test case over a foreign currency loan contract disputed by one of the bank's debtors, ruling that the contract was valid.
The verdict will be a disappointment for many Hungarian households who took loans denominated in Swiss francs or euros before the 2008 global financial crisis and are now unable to repay their debts.
Their debt costs have soared due to a plunge in the forint and a surge in the Swiss franc over the past five years.
In its first ruling on the politically sensitive issue of foreign currency loans, Hungary's highest court, the Kuria, dismissed the debtor's claim that the 2006 contract was void.
The debtor had argued that the bank should have stipulated as a cost item the difference between the exchange rate at which the loan had been disbursed and the rate applied every month when installments were calculated.
The debtor had previously lost the case in a first-degree court and then won it in a second-degree court. OTP appealed that decision at the Kuria.
However, the Kuria also ruled that the spread was indeed a cost and should have been defined in the contract.
Instead of annulling the contract, it maximised the exchange rate spread retroactively and said OTP would have to repay some of the exchange rate fees it had charged its client.
"It serves the interest of both parties that the Kuria maintained the contract while modifying the conditions, (and) tweaking the contract it maximised the exchange rate spread at a plus/minus 0.5 percent relative to the middle exchange rate," said Gyorgy Wellmann, head of the civil college of the Kuria.
Last month Hungary's financial watchdog PSZAF warned the Kuria against passing a blanket ruling on lawsuits launched by foreign-currency debtors against their banks, saying this could undermine the financial system.
OTP shares were up 4.8 percent at 4,821 forints at 1428 GMT, outperforming the broader market which was up 2 percent.
In Hungary's EU neighbour Croatia, a court ordered eight commercial banks on Thursday to recalculate loans indexed in Swiss francs in the national kuna currency at a fixed interest rate, saying they had overcharged loan users.
Outside the Kuria's building around 200 desperate loan holders holding banners staged a protest.
"This (lending) was a foreign exchange scam in the disguise of a loan," said Erika Kassai, 50, before the ruling, adding she hoped the Kuria would annul the contracts.
"They lured me into this scam and they want me to pay now that it has gone all wrong."
Kassai's original 6 million forint ($26,400) loan has ballooned to 11.5 million because of the weak forint, plus the penalties incurred after she stopped paying her installments. ($1 = 227.1816 Hungarian forints) (Reporting by Marton Dunai/Krisztina Than; editing by Ron Askew and Gareth Jones)