(Updates with background, legal basis, ceiling)
By Marcin Grajewski
BRUSSELS, Oct 28 (Reuters) - The European Union is preparing a financial aid plan for Hungary, the EU state hardest hit by the global economic crisis, but there will be strings attached. "The European Commission stands ready to help and we are preparing to grant financial assistance to Hungary," Amelia Torres, spokesman for the EU's executive said on Tuesday, adding EU member states had already agreed in principle to the aid.
The Commission gave no details, but under EU law, member states that are still outside the euro zone can receive medium-term loans up to the total of 12 billion euros ($15 billion).
The loans are for countries which are "experiencing or are seriously threatened with difficulties in their balance of current payments or capital movements", according to EU regulation.
The regulation says the loan is disbursed in instalments if the country meets mutually agreed conditions aimed at restoring financial stability.
The European Commission is due on Wednesday to announce a package of fiscal and other measures aimed at containing the fallout from an economic slowdown across the 27-nation bloc.
Hungary, which joined the EU in 2004 but has not yet adopted the euro, already agreed a financial aid package with the International Monetary Fund (IMF) to help stabilise its battered currency and banking sector.
Hungary has been hit hard by the global financial crisis. It has one of the most fragile economies in Europe due to its high budget and current account deficits and heavy reliance on external financing.
The IMF said on Sunday a "substantial financing package" had been agreed with Hungary, and the Fund, the EU and individual European governments would take part. Details of the deal have yet to be unveiled.
Torres said EU funds for Hungary could be raised on financial markets. According to the regulation, the European Central Bank prepares the administration of the loan.
"Loans granted as medium-term financial assistance may be granted as consolidation of support made available by the ECB under the very short-term financing facility," the law said.
Hungary's central bank (MNB) signed a deal in mid-October with the ECB on repurchase transactions which will allow the MNB to borrow up to 5 billion euros.
The IMF is expected to lend billions of dollars to Hungary to help it stabilise its battered markets and restore confidence in its banking system and may demand deeper reductions in the budget deficit in return. (Writing by Marcin Grajewski, editing by Mark John)