The budget discipline compact signed in Brussels on Friday is needed because for years eurozone countries lived beyond their means borrowing money and running big deficits that is spending more than they received in tax revenues.
Now balanced budgets will be mandatory and enforced.
Under the so called “golden rule” governments have committed to keeping their budgets balanced or even in surplus.
The structural deficit — which strips out one-off effects such as debt repayments and the economic cycle — should be capped at 0.5 percent.
A country which has debts of more than 60 percent of its annual GDP has to reduce that by one twentieth a year.
Those that overspend will face automatic sanctions and the rules will be enforced by the European Court of Justice.
There are exceptions for countries with healthier economies.
The fiscal contract applies in full to all the 17 eurozone members.
A total of 25 have signed it. Those that do not use the euro currently can chose to adopt any elements they want. When they do join the euro it will become fully binding on them.