The Spanish economy is falling deeper into recession and depositors are pulling their money out of the banks figures published today show, as the government moves closer to seeking a European rescue package.

The recession grew stronger in the second quarter of 2012 and is expected to get worse as austerity measures cut into demand for goods and services.

A rush by consumers and firms to withdraw their money from Spanish banks intensified in July, with private sector deposits falling almost 5%, to €1.509 trillion at end-July from €1.583 trillion a month earlier.

Analysts believe it is inevitable that Spain will soon have to call for a European rescue package to help bring its debt costs down as austerity measures designed to slash the public deficit push the economy deeper into recession.

Against this background, Prime Minister Mariano Rajoy will meet European Council President Herman Van Rompuy in Madrid later today, a week before the European Central Bank discusses new measures to help debt costs in European nations hardest-hit by the crisis.

The ECB meeting on 6 September also coincides with a visit by German Chancellor Angela Merkel to the Spanish capital and a key longer-term bond auction.

"With much more fiscal austerity in the pipeline and unemployment at astronomic highs, the risks are clearly tilted towards a more protracted recession," said Martin van Vliet, an economist at ING.

He expected Spain to formally request additional external financing in mid-September or October. Spain has already negotiated up to €100 billion in aid for its ailing banks.

Gross domestic product fell by 0.4% in the second quarter of the year, according to final figures that confirmed a preliminary reading. However on an annual basis it dropped by 1.3%, worse than initial estimates of 1.0%.

Spain's economy fell back into recession in the first quarter of the year, when output fell 0.3%, and government estimates show GDP will probably fall this year and next.

The data came a day after Spain said its economy performed worse than expected in both of the last two years.

Economists said the outlook could test Spain's ability to slash its deficit this year to 6.3% from 8.9% in 2011.

"The economy is much weaker than previously thought and this could make it more challenging for the government to achieve the ambitious fiscal targets," said Tullia Bucco, an economist at UniCredit.

Today's data showed exports provided a degree of support for the economy, growing by 3.3% year-on-year in the second quarter. That compared with a fall of 3.9% in national demand, after a revised fall of 3.2% in the first quarter.

The government is hoping that exports will put the economy on the road to recovery. However a slowdown in the wider euro zone, where most of Spain's goods are shipped, could put that theory at risk.

More encouragingly, the Treasury managed to sell €3.6bn of short-term debt, and paid far less to investors than a month ago.

The yield on the 3-month bill was 0.946%, down from 2.434% a month ago, and was 2.026% on the 6-month bill, down from 3.691% in July.

The fall partly reflects growing market expectations that Spain will soon call for a European bailout. However exactly when remains unclear, and investors will watch the European Central Bank's meeting next week for measures to relieve Spain's debt costs.

"The real test begins next month when sentiment could worsen significantly if ECB-backed measures to shore up Spanish and Italian debt markets fall short of expectations," said Nicholas Spiro at Spiro Sovereign Strategy.