He added: "We would have preferred a unanimous agreement. This was not possible so I think the only alternative was to do it through this kind of inter-governmental treaty."
Meanwhile Mr Cameron insisted the outcome was no cause for a renewal of calls for a referendum in the UK. The Prime Minister dismissed suggestions that today's outcome would increase the Tory eurosceptic clamour for a referendum.
"This is not going to be a treaty that Britain is signed up to, so I don't think this is an issue that arises.
"This new round of integration and special powers, and surrenders of sovereignty for European countries and others who want to join the euro - they will be carried on outside the European Union Treaty. So we will not be presenting this new treaty, when it's agreed, to our Parliament. It will not involve Britain."
He said what he had decided had been "the right thing for Britain - a tough decision but the right one".
William Hague, the foreign secretary, denied the decision to remain outside the group of at least 23 had left Britain out of a new "inner club" within the EU.
He said Britain had done exactly as it had promised by not signing up to an agreement unless it was in our interests. He said: "I do not accept the idea of a two-speed Europe. It doesn't mean the UK loses its influence over other matters".
At the summit in Brussels efforts to alter the treaty governing all 27 countries were abandoned in the early huors.
The 17-member eurozone will now press on with a separate treaty - likely to be joined by eight of the 10 remaining non-eurozone states.
Only the UK and probably Sweden would stay outside the deal, officials suggested, with the British Prime Minister accused of scuppering a full accord and holding out for concessions to take back to his eurosceptics.
Mr Cameron told a press conference that he wished the eurozone well with its new treaty, but the UK could not accept it as the safeguards he had demanded were not on offer.
He insisted the to create a new, separate treaty instead of a "treaty within a treaty" did not compromise Britain's role in the EU's issues most important to the country - the single market, trade and investment and related issues.
He said of the talks: "There were strong disagreements but it was good-natured. People understood each other. That relationship will be maintained and will work well, but at the end of the day I made my judgment that it was not in Britain's interests to take part."
He explained: "I came here with one of two outcomes in mind: safeguards (for the UK) that made a treaty within a treaty safe; or allowing others to set up a different treaty on their own and ensure that the European Union is maintained as a single market.
"I had to pursue very doggedly what was in Britain's interests, which is very difficult in a room where people are pressing you to sign up to things because they say it is in all our interests."
Mr Cameron dismissed the risk of a two-tier Europe, insisting Europe was already in several tiers - the UK was in Nato, but not in the EU Schengen open borders arrangement and was not and never would be in the single currency and there has always been variable geometry.