Tony Blair has said the new EU constitution keeps essential British vetoes and sets a new shape for Europe.
Blair promised to stick by his "red lines" on keeping key vetoes
Speaking after 25 EU leaders agreed the historic document, Mr Blair hailed the deal as "a success for Britain and a success for Europe".
Eurosceptics accused Mr Blair of betrayal and Tory leader Michael Howard branded his stance "a put-up job".
But the prime minister was bullish about his chances of winning a referendum on the treaty.
He acknowledged he would face attacks, but said the talks showed in the "new Europe" there were allies ready to back Britain's vision for the EU.
Details set out
The search for agreement on a new European Commission president to succeed Romano Prodi will take place in later talks.
Senior conservative Chris Patten has withdrawn from the race.
The other frontrunner, Belgian Prime Minister Guy Verhofstadt, ruled himself out on Friday after opposition from the UK and other countries.
A tense day in Brussels on Friday also saw UK officials criticise French and German tactics.
Every country must now ratify the treaty. In some cases national parliaments will do this, but Britain is among countries to have already promised a public referendum.
The document sets out the powers of the national governments of the member states and the EU's various institutions.
It contains a charter of fundamental rights and a detailed catalogue of how the union will conduct a wide range of internal and foreign policies.
Under new voting rules, measures must have the backing of at least 55% of EU states, representing at least 65% of the total population, to pass.
The UK has kept its vetoes on economic policy, defence and foreign affairs. It can also opt out of majority decisions on cross-border criminal matters and social security for migrant workers.
Eurosceptics accuse the government of betraying British interests but Mr Blair said a referendum "yes" vote was achievable if people listened to what was actually in the treaty.
He said: "There was a battle about the type of future Europe we were going to have.
"There were people who wanted to harmonise taxes or give away the veto on foreign policy and defence. That is not what has happened...
"Instead we have found common cause and common allies in ensuring Europe remains a Europe of nation states."
He said the talks had been a "hard struggle" but defied anyone to say the government had not delivered on all its promises.
Britain had not been isolated, added Mr Blair, arguing the idea of a European superstate was now dead.
The Conservatives had urged Mr Blair to veto the whole constitution.
Tory MP David Heathcoat-Amory said: "This is disastrous and completely defies what happened a week ago in the European elections.
"People sent a very clear message they did not want more Europe, they wanted less.
"The government has ignored that and we're signing up to the biggest step forward of all."
Michael Howard branded talk of Mr Blair taking a tough stance as "a put-up job".
But European Commission vice-president Neil Kinnock welcomed the constitution and said the referendum was winnable if people knew the facts.
"Familiarity and comprehension does assist with removing fears and getting rid of the legends and building support for engagement in the EU," he told BBC Radio Four's Today programme.
"My problem is that so many attitudes are based upon distorted and very inaccurate information," he said.
The UK Independence Party, which raised its share of the vote at the European elections, wants an immediate referendum - although Mr Blair says the treaty will first go through Parliament.
UKIP leader Roger Knapman, now an MEP, accused Mr Blair of ignoring the will of the people.
"This is an absolute betrayal of the British electorate by a government set on following its own agenda regardless of the wishes of the British people," he said.
Liberal Democrat leader Charles Kennedy said voters would be distrustful of leaders arguing about commission jobs instead of focusing on restructuring the enlarged EU.