Hungarian Prime Minister Viktor Orban said on Monday he would iron out differences with the European Union and the International Monetary Fund over disputed legislation to secure an aid deal and avoid being shut out of markets.

Orban's government has until Friday to explain how it plans to change its laws on the central bank, the judiciary and a data protection authority that the EU's executive has said threatened the institutions' independence and breached the bloc's rules.

After a string of ratings downgrades to junk status and a fall in the forint to record lows in early January, Orban backed down and on Monday reaffirmed his commitment to reach a deal with the IMF/EU and reboot stalled talks on a funding agreement.

We must fight but we must also do this with common sense and working toward an agreement, Orban told lawmakers in a short speech opening the spring session of parliament.

We must proceed in this manner in our talks with the EU and the IMF, be it certain issues of central bank regulation, the status of the ombudsman, the law on the judiciary or the financial safety net.

Hungary needs a safety net to rein in borrowing costs and maintain access to market funding as it prepares to roll over nearly 5 billion euros of external debt this year, partly to repay an international loan that saved it from collapse in 2008.

On Monday the forint traded around 290 versus the euro, boosted by the government's pledge to work with the EU, as well as improved market sentiment following parliamentary approval of a Greek austerity package.

Orban also called on parliament, where his ruling centre-right Fidesz party holds a two-thirds majority, to support a new European Union treaty on fiscal union as his government works to mend ties with Brussels after recent legal debates.

DEADLINE

Bence Retvari, state secretary at the Ministry of Justice and Administration, told Reuters earlier on Monday that the government would send its formal reply to the European Commission regarding its disputed laws by a February 17 deadline.

He said if the proposals are accepted in Brussels, which must sign off on any aid package to Hungary, parliament could modify the legislation within two weeks.

Retvari said there were two points in the central bank law over which there was still debate: the text of an oath which the bank's leaders must take and a cap on public sector salaries which also affects central bankers.

We are ready to agree on both of these issues, on one of them (the text of oath) we see a compromise solution, while we can't see this (for salaries) but we are certain that we will find the solution during the negotiation, Retvari said.

Retvari said the government also saw room for compromise with Brussels on the other two laws, affecting the judiciary and the data protection authority.

He said the government was not aware of additional requests for amendments but if there were, that could help the far right opposition party.

If the EU sets further conditions or opens further conflicts with Hungary, with that it could contribute to the strengthening of the opposition far right Jobbik party, he warned.

Jobbik, which has caught up with the other main opposition party the Socialists in recent opinion polls, held a rally last month where two of its deputies burnt a European Union flag.

Orban's ruling Fidesz party still has the strongest public support even though it has dropped sharply since its sweeping election victory in 2010.

ONE STEP FORWARD

One lawmaker from the ruling Fidesz party said on Saturday talks on aid with lenders could start in early March and a deal could be agreed by May.

For formal talks to start, Orban needs to reassure Brussels that his conservative government will respect the central bank's independence.

I don't think it will be all that smooth from now on, but we will be one step forward, said Zoltan Torok, an analyst at Raiffeisen. There will be some more punches here and there, but we will make progress gradually (towards a deal with IMF).

Analysts say that even if these issues are resolved, the road to an agreement could be rocky due to the government's unorthodox economic policies and the country's fiscal risks.

The government has pledged to remove large windfall taxes on energy, retail and telecoms firms by 2013, and has also promised to halve its bank tax, the EU's highest.

But a sharp slowdown in the economy could jeopardize this year's budget deficit target of 2.5 percent, and next year looks even more challenging.

(Reporting by Krisztina Than; editing by Anna Willard)