EU leaders to Britain: color within the treaty lines and demands on EU reform could be met

European Union leaders on Thursday sought to be accommodating to British demands to change the way the EU is run — but only if Prime Minister David Cameron doesn't seek to undermine core principles on which the 28-nation bloc is built.

Britain will have a referendum before the end of 2017 to decide whether to stay in the EU. Cameron is seeking wholesale changes to how the EU is managed and wants to ingrain it more with the British view of non-interference and sustained sovereignty rather than the EU's mantra of ever closer union.

Although many EU nations back British demands to cut red tape and streamline the bureaucracy in Brussels, they balk at suggestions to put barriers in the face of the EU's cherished rules of near-unfettered travel across the bloc with equal rights for all.

German Chancellor Angela Merkel assured Cameron he would have a friend in Germany in his quest to renegotiate fundamental parts of EU legislation if he colored within the lines of the EU treaty.

"On our side we would like to keep Britain as a member of the EU, but at the same time we do not want to limit the basic freedoms, nondiscrimination, the fundamental principles of the EU," Merkel said.

"I believe there should be possibilities to find solutions if all sides are willing to compromise," Merkel said of the upcoming negotiations with Britain.

If there is no fundamental reform, Cameron has indicated it could lead to "Brexit," or a potential British exit.

British proposals on welfare and migration are expected to be the toughest to find an agreement on. Particularly grating on member states is a plan for a four-year ban on in-work benefits for migrants, something many feel amounts to discrimination. Cameron has said the issue was not so much people coming to Britain as them getting access to the welfare system too easily under current EU rules.

European Council President Donald Tusk said "some parts of the British proposal seem unacceptable" unless they are changed.

Cameron says he will be looking for "real progress" during Thursday night's summit session on all issues at stake in the nation's attempt to redraw the legal books of the EU.

He said "we are pushing for real momentum so that we can get this deal done. So I am going to be battling hard for Britain right through the night."

Proposals in legal text are expected later. A February summit is seen as the first opportunity to clinch a reform deal, though a planned March summit would seem more likely.

Britain's industry and services sector stands to lose billions in trade if the country leaves the EU. Europe would also lose if Britain departs, leaving the continent with much less diplomatic and military clout.

French President Francois Hollande laid out the tough way ahead. "Allow Britain to stay in the EU, maintain the EU principles while at the same time pushing through essential reforms," he said.