EU leaders have agreed to set up a permanent mechanism to bail out any member state whose debt problems threaten the 16-nation eurozone.
The eurozone stability mechanism will require a change to the EU's Lisbon Treaty - and that has now been agreed.
The European Council President, Herman Van Rompuy, said EU leaders were ready to do whatever was required to protect the currency.
This year Greece and the Irish Republic have received emergency EU bail-outs.
The 27 leaders, meeting in Brussels on Thursday, agreed that in 2013 the permanent mechanism would succeed the eurozone's 750bn-euro (£637bn; $1tn) temporary bail-out fund, the European Financial Stability Facility (EFSF).
But Luxembourg's Prime Minister Jean-Claude Juncker said that before 2013 "there will be no enlargement or deepening of the volume" of the EFSF.
Analysts say the EFSF would not be big enough to bail out Spain, if Madrid's finances deteriorated to the point where it needed a rescue.
The EFSF, set up in May during the Greek bail-out crisis, is funded by the EU and International Monetary Fund.
"We stand ready to do whatever is required to ensure the financial stability of the eurozone as a whole," Mr Van Rompuy told a news conference.
European Commission President Jose Manuel Barroso said it was "a big day for Europe" and leaders must now put their words into action.
"Our task now is to hold a course - walk, not talk - and prove those wrong who predicted the demise of our common currency."
Two sentences will be added to Article 136 of the Lisbon Treaty - a change that Germany demanded to make any future eurozone bail-out legally watertight.
The new text, quoted by Mr Van Rompuy, says: "The member states whose currency is the euro may establish a stability mechanism, to be activated if indispensable to safeguard the stability of the euro area as a whole.
"The granting of any required financial assistance under the mechanism will be made subject to strict conditionality."
The "strict conditionality" means that any eurozone country requiring such a rescue will have to act to tackle its debt or deficit.
The treaty change can be approved through a "simplified revision procedure", Mr Van Rompuy said.
That means the EU should avoid any repeat of the wrangling and referendums that plagued the treaty negotiations for years. But each member state will still have to formally approve the amendment.
The aim is to put the amendment into effect by 1 January 2013 at the latest, so that the permanent fund itself can start operating in June 2013, Mr Van Rompuy
As the UK uses the pound it will not have to contribute to the fund, Prime Minister David Cameron has said.
The new mechanism will require private sector bondholders to share the cost of any debt restructuring on a case-by-case basis, Reuters news agency reports.
The summit comes amid continuing concern about stability in the eurozone, as national debts and deficits have soared above the EU's targets.
Portugal and Spain have been under financial market scrutiny since the Irish Republic was forced to take an aid package of 85bn euros (£72bn; $113bn) last month.
The European Central Bank (ECB) has been buying billions of euros of sovereign debt to ease the pressure on the countries seen as most vulnerable in the eurozone. It is to double the reserves it holds - to 10.8bn euros, from 5.8bn euros at present.
A permanent mechanism is the minimum the financial markets had come to expect, says the BBC's economics correspondent, Andrew Walker.
Analysts have expressed concern that the summit is not addressing a key issue - whether or not investors who bought bonds in struggling euro nations would have to lose money - or in financial parlance, "take a haircut" - on their investment between now and 2013.
This week the yield rose on Spanish bonds - essentially the interest rate which the government must pay in order to borrow money.
The rising cost of borrowing reflects investors' concern about the outlook for the Spanish economy and its banking sector in particular.
Madrid insists it will not need to apply for a bail-out from the EFSF.
But on Wednesday the ratings agency Moody's warned it may downgrade Spain's debt.