Germany's budget deficit has dropped back within European Union limits for the first time in five years, official figures have shown.
Consumers are playing a vital role in Germany's economic recovery
The Federal Statistical Office said that the budget deficit was 2.5% of gross domestic product (GDP) during the first six months of this year.
The EU had threatened Germany, Europe's largest economy, with sanctions should its deficit top the 3% limit again.
Figures also showed that Europe's largest economy was still recovering.
Earlier this week, Chancellor Angela Merkel said Germany had lost its "sick man of Europe" tag as better domestic demand and gains in construction and investment had helped the economy get back on its feet.
According to the statistical office, which confirmed earlier estimates, Germany's economy expanded by 0.9% in the three months to the end of June.
Angela Merkel wants to boost growth and cut the budget deficit
The rate of growth was the fastest seen in Germany for five years.
Following Thursday's figures, analysts said they probably will have to revise their annual economic growth forecasts for Germany upwards, tipping it to come in at more than 1.7% this year.
French Finance Minister Thierry Breton said on Thursday that his country's economy also was doing better and confirmed that growth would be between 2% and 2.5% this year, at the top end of government's growth targets.
Despite the optimism, analysts also warned against becoming too upbeat. A number of problems persist in the global economy, including high energy costs and the threat of an increase in world interest rates, that could easily stifle the pick up in domestic spending that has been so important in Germany.
In the club
Germany is not alone in battling a large budget deficit, and France also has been criticised for failing to rein in state spending.
As a member of the single European currency, Germany signed up to the Growth and Stability Pact and agreed to keep its budget deficit to less than 3% of GDP.
However, Germany's deficit ballooned past EU limits as economic growth slowed and the government had to deal with higher levels of unemployment at a time when revenues from areas such as taxation were under pressure.
Chancellor Merkel has pushed through an increase in the level of value added tax from January in an effort to cut the deficit.
Many observers and politicians have criticised the Growth and Stability Pact, arguing it is inflexible and does not allow governments to boost growth by increasing state spending even during difficult economic periods.