European Council president Donald Tusk has warned that failure to finalise Britain's renegotiation deal at a Brussels summit next month would "compromise our common future".

In a letter to EU leaders unveiling a draft package, Mr Tusk said the process had been "difficult" and there were still "challenging" discussions ahead.

However, he said there was now a "good basis for compromise" and officials would be meeting on Friday to try to hammer out the details.

"The clear objective is to have an agreement of all 28 at the February European Council. To succeed we will all need to compromise. To fail would be compromising our common future," he said.

David Cameron has previously played down the importance of securing a deal at the summit in Brussels on February 18-19, stressing that the UK's referendum does not have to be held until 2017.

Mr Tusk said maintaining the "unity of the EU is the biggest challenge for all of us", and the reforms had been negotiated in that spirit.

"To my mind it goes really far in addressing all the concerns raised by Prime Minister Cameron. The line I did not cross, however, were the principles on which the European project is founded," he wrote.

"I deeply believe that our community of interests is much stronger than what divides us."

In a reference to the famous line from Shakespeare's Hamlet, Mr Tusk said: "To be, or not to be together - that is the question which must be answered not only by the British people in a referendum, but also by the other 27 members of the EU in the next two weeks.

"This has been a difficult process and there are still challenging negotiations ahead. Nothing is agreed until everything is agreed.

"I am convinced that the proposal is a good basis for a compromise. It could not have been drafted without the close and good co-operation of the European Commission.

"In order to facilitate this process the Commission also made political declarations that are included in this package."

Mr Tusk argued that the plans "pave the way for the further integration within the euro area while safeguarding the rights and competences of non-participating member states" - although he insisted protections would not "constitute a veto nor delay urgent decisions".

The proposals recognise that "in light of the United Kingdom's special situation under the Treaties, it is not committed to further political integration", and reinforces "respect for subsidiarity", he added.

"I propose that the member states discontinue the consideration of a draft legislative act where a number of national parliaments object to it on the grounds of subsidiarity, unless the concerns raised can be accommodated," he wrote.

Mr Tusk made clear that the changes had to "fully respect the current treaties, in particular the principles of freedom of movement and non-discrimination".

"Therefore the proposed solution to address the UK concerns builds on the clarification of the interpretation of current rules, including a draft Commission Declaration on a number of issues relating to better fighting abuse of free movement," he wrote.

"The draft Decision of the Heads notes, in particular, the Commission's intention to propose changes to EU legislation as regards the export of child benefits and the creation of a safeguard mechanism to respond to exceptional situations of inflow of workers from other member states ...

"This approach, as well as the exact duration of the application of such a mechanism, need to be further discussed at our level."

Mr Tusk said "most of the substance" would be introduced through a "legally binding Decision of the Heads of State or Governments".

But he added: "We should also be prepared to discuss the possible incorporation of the substance of a few elements covered by the Decision into the Treaties at the time of their next revision."