EU rules say that countries using the euro are not allowed to have an annual deficit of more than 3% of GDP, but several countries have failed to keep to that rule in recent years.
Note that Germany, Italy and France were all among the first countries to break the Maastricht rule during the last decade, while Spain and the Republic of Ireland ran surpluses before the 2008 crisis.
Since 2008, peripheral economies such as Spain, Greece and Portugal have run big deficits, because their economies have slumped, generating less tax revenues and requiring more unemployment benefit payments.
Ireland experienced an exceptionally enormous deficit of 31% of its GDP in 2010, largely due to the cost of rescuing its banks.
Italy, however, has faired surprisingly well. In fact, if you exclude the cost of interest payments on its enormous debts (which the graph does not), the Italian government has consistently run budget surpluses.