BUDAPEST (Reuters) - Hungary’s prime minister said on Thursday he believed central European countries could reach a deal on Britain’s demand to curb benefits for migrant workers from EU countries in a bid to persuade Britons to stay in the European Union.

The Britain's Union Jack flag flutters next to the EU flag at the opening ceremony of the Commonwealth Heads of Government Meeting (CHOGM) in Valletta, Malta November 27, 2015. REUTERS/Toby Melville

Viktor Orban told a joint news conference after talks with visiting British Prime Minister David Cameron they had agreed on most of Britain’s reform agenda for the 28-member bloc and he was convinced there would be a deal on social benefits too.

“I think we, the Visegrad four, together we will represent the same stance and we will reach an agreement ” Orban said, referring to an alliance comprising Hungary, Poland, the Czech Republic and Slovakia.

The issue has emerged as the toughest of a series of demands Cameron has put to EU partners in a renegotiation of London’s relationship with the bloc before it holds a referendum possibly as early as June on whether to stay in the union.

An opinion poll published on Thursday showed that a majority of Britons who have made up their mind would vote to leave the EU, making Britain by far the most reluctant member.

Orban did not say how a deal on benefits could be achieved. He echoed other central European leaders in saying there must be no discrimination on grounds of nationality among EU citizens, but he was open to helping tackle abuses.

“For us it is very important, first of all, that we should not be regarded migrants,” the nationalist Hungarian leader said. “We do not go to Britain to be parasites, we do not want to take away from people living there... we want to go there and we want to work.”

Cameron insisted his demand to deny in-work benefits to newcomers from EU countries for four years remains in play but made clear he was open to alternatives.

“As I’ve said I am open to listening to alternative solutions ... I’m sure that a lot of hard work is going to be done between now and the February Council to reach agreement. But I am confident we can reach agreement,” he said.

OPPOSITION TO EU GROWING

As Cameron pushed for a deal to improve London’s membership terms, including protecting its large financial services sector from being overruled by the euro zone, an ORB poll indicated that opposition to the European Union was growing in Britain.

While 21 percent of voters are still undecided, 43 percent want to leave the EU and 36 percent want to stay, it showed.

When the undecided are stripped out, 54 percent of voters want a British exit, or ‘Brexit’, up from 51 percent a year ago, and 46 percent want to stay, down from 49 percent.

The public scepticism contrasted with Cameron’s latest declaration of optimism that a deal can be struck on his demands for changes in Britain’s relationship with Brussels.

“We believe that all these issues can be dealt with. The discussions are going well,” Cameron said in Wildbad Kreuth, Bavaria, after what he said was an “excellent meeting” with German Chancellor Angela Merkel over dinner on Wednesday.

The ORB poll indicates that the referendum could be far closer than some politicians had assumed and that the result will depend on a fifth of voters who are still undecided.

“Despite the impending vote on Brexit, significantly more people report to have felt further removed from Europe over the last twelve months than closer to it,” Johnny Heald, managing director of ORB International, told Reuters.

“If the Prime Minister is to avoid disaster on his watch someone needs to start convincing the public very soon on why we should remain a part of the EU.”

A British exit would shake the Union to its core, ripping away its second largest economy and one of its top two military powers.

Pro-Europeans warn an exit from the EU would hurt Britain’s economy and could trigger the break-up of the United Kingdom by prompting another Scottish independence vote. Opponents of EU membership say Britain would prosper outside the bloc.

“REASONABLE DEAL”

Cameron is urging fellow leaders to clinch an agreement at an EU summit on Feb. 18-19.

Before Wednesday’s dinner with him, Merkel said it was important in the coming weeks to “make decisions in our own interest in order to achieve a reasonable package that will allow Great Britain to remain a part of the European Union.”

Dutch Prime Minister Mark Rutte, an ally of Cameron’s whose country holds the bloc’s rotating presidency for the next six months, said he was “relatively optimistic” that a deal could be reached at the mid-February meeting.

Cameron addressed a session of the Christian Social Union, the sister party of Merkel’s CDU, before travelling to Budapest to meet Orban, a prickly Eurosceptic ally whose civil rights record has been widely criticised in the EU.

“I’m confident with goodwill - and there is goodwill I think on all sides - we can bring these negotiations to a conclusion and then hold the referendum,” Cameron said at the CSU meeting.

Orban, whose outspoken opposition to admitting refugees and embrace of “illiberal democracy” have boosted his popularity at home but drawn condemnation abroad, was Cameron’s only ally in a failed 2014 attempt to block the appointment of Jean-Claude Juncker as European Commission president.