Attractive tax benefits can accrue to companies expanding overseas, but for Prime Minister Mariano Rajoy's government, which now seems resigned to accepting a European financial rescue, the income flow is reversed.

Rajoy has passed 65 billion euros ($84 billion) of austerity measures including public sector wage cuts and consumer tax hikes but has been reluctant to lean on businesses that are key to maintaining jobs when one in four Spaniards is unemployed.

Despite its domestic woes, Spain is home to globally successful corporations such as banks Santander and BBVA, telephone operator Telefonica, retailer Inditex and oil company Repsol.

Those five generated net profit of 17.8 billion euros in 2011, outstripping the 16.6 billion euros the government raised in corporate tax from a total 1,400 Spanish businesses that year. In 2007, the corporate tax take was 44.8 billion euros.

"Big corporations are paying less and less in taxes. Their profits have not fallen at the same pace that their (Spanish) tax contribution has fallen," said Carlos Cruzado, chairman of Treasury Ministry trade union GESTHA.

That the companies have continued posting profits at all is largely thanks to earnings abroad, but as foreign profits are generally taxed where they are made, Spain's coffers have seen less and less.

Spain receives a smaller proportion of corporate income than personal income, with businesses paying 11.6 percent of total group profits in Spanish taxes compared with 12.4 percent for individuals, according to 2011 data from the Spanish Tax Agency.

TAX APPEAL

Spanish companies' heightened search for foreign markets to cushion a weak domestic business has come with an added bonus for their bottom line in more favorable tax regimes.

In 2010, 30 of Spain's 35 blue chip companies had subsidiaries in territories considered tax havens, according to the latest report by Spain's Observation Group for Social Corporate Responsibility.

The organization, which is partially subsidized by the Labor Ministry, put the number at 18 before Spain's economic crisis began.

"Not only tax reasons justify this trend, but also the internationalization of Spanish groups and the search for new markets, especially in the context of the crisis seen in Spain," said Josep Serrano, Senior Manager of Transfer Pricing & International Tax at Deloitte in Spain.

The use of subsidiaries in tax havens to reduce tax bills has been a rising global trend in recent decades, tax campaigners said.

In Spain, companies also benefit from exemptions on dividends from foreign subsidiaries, Deloitte's Serrano said.

Spain has a headline corporate tax rate of 30 percent, broadly in line with other large European economies. Switzerland, however, has a headline rate of 8.5 percent, and lawyers say deductions can be made to reduce this further.

"A fundamental right of EU law is the freedom of establishment. All companies and taxpayers look after their tax affairs, and if they can pay a lower rate somewhere else, it's better for their business and natural that they would do so," a global tax lawyer based in Spain said.

Inditex, the world's largest clothing retailer, with a presence in 85 countries and two buying centers in Switzerland, posted a 10.3 percent rise in pretax profit in 2011, but tax paid on profits fell to 24 percent from 25 in the same period.

The falling effective tax rate contributed to an 11.7 percent rise in net profit.

Inditex, owned by Forbes-list billionaire Amancio Ortega, denied it had a strategy of sheltering profit in tax havens but said the nature of its business entailed paying taxes in the countries where it generates its sales.

Among second-tier Spanish blue chips, global infrastructure firm ACS, run by another Spanish billionaire, was present in 11 territories considered tax havens by various international authorities in 2011, up from eight in 2010.

Of the 11, seven are considered tax havens by Spain.

Part of the rise is because it bought a majority stake in German builder Hochtief, which gave it access to new markets through subsidiaries.

"We don't do anything other than our normal business activity in these countries, and we comply with all tax laws in all of the countries where we are present," ACS said.

REAL ESTATE HANGOVER

Spain's sharp fall in tax collection also reflects the disappearance of hundreds of firms linked to the property and construction sectors after the 2008 crash, including regional savings banks that lent freely during a decade-long boom.

While the government wants to increase tax returns, it doesn't want to limit companies' scope to invest and employ more. Its 2013 budget unveiled last week focused on spending cuts rather than new taxes.

Rajoy did eliminate some corporate tax breaks in 2012, a policy he will continue in 2013, and has also brought forward some tax payments, though that could be storing up problems.

"We might ask ourselves if the rise in prepayments in 2011 won't mean a fall in revenues for 2012," Spanish tax lawyer Javier Galan said.

The Tax Agency said the tax base, excluding prepayments, continued the "drastic decline" seen in the past three years.

So far the conservative government has said total tax revenue would be higher than originally budgeted in 2012, partly due to a hike in VAT.

Rajoy is also struggling to tackle a large black economy estimated to account for 20 percent of gross domestic product.

A fiscal amnesty law has so far fallen pitifully short of target, raising just 50 million euros of a 2.5 billion target.

($1 = 0.7749 euros)

(Additional reporting by Robert Hetz in Madrid and Tom Bergin in London; Editing by Will Waterman)

By Tracy Rucinski