Media playback is unsupported on your device Media caption David Cameron said 2016 will be the year when Britain achieves vital reform of the EU

There was no Brussels bust up, no leaders flouncing out, instead, the beginnings of an agreement and the biggest hint yet from the prime minister that you will get a vote on staying in or out of the EU next year.

He has long made a commitment to holding the referendum by the end of 2017. But even after difficult talks, here was what seemed a new confidence from David Cameron that he can achieve a deal and then a public vote next year.

He was careful to say the timetable might slip, acknowledging it is tight. But there is a new urgency.

Mr Cameron came to Brussels promising to inject political momentum into his attempt to change the rules of the EU. It is arguably the biggest project he has undertaken as prime minister, and indeed, his biggest political risk.

He leaves with a promise on paper at least, from the rest of the EU to try to find a deal on all of the four areas of European law that he wants to change - slimming down rules and regulation, slowing down political integration, cutting back on EU immigration and protecting Britain's interests as a country inside the EU but not in the euro.

Even this formal commitment to help has taken time and persuasion, and is a very long way from conclusion.

And the prospect of banning some benefits for EU workers in the UK for four years as David Cameron wants is tiny. For Eurosceptics in his own party his proposals are not enough to change their minds.

There are few clues of how final agreements will be reached, although opt outs of EU law rather than a whole new treaty are possible.

To keep the timetable he has publicly set today, getting to a yes in Brussels, then at home will occupy much of David Cameron's time from now on.

But his officials are somewhat relieved that they have got this far - confident that there is a path towards a deal, rather than a road to nowhere.