MADRID (Reuters) - The conservative government of Madrid said on Wednesday it would slash taxes for foreigners who invest in the central Spanish region, a move that seeks to countermand a wealth tax levied by the left-wing national executive.

The proposed legislation is the latest attempt by the region's firebrand leader, Isabel Diaz Ayuso of the People's Party (PP), to present Madrid as a business-friendly bulwark against the progressive policies spearheaded by Socialist Prime Minister Pedro Sanchez.

In late 2022, Spain's leftist coalition government launched a temporary "solidarity tax on large fortunes" that effectively annulled the regional exemption from an existing wealth tax practised in Madrid, which in recent years has vied with Miami to attract Latin American fortunes.

Ayuso's signature bill will deduct 20% of investments in bonds, treasury bills, shares in listed and unlisted companies or contributions to limited companies from the income tax owed by beneficiaries.

While the bill still needs to be approved by the regional assembly, its passage is guaranteed, as Ayuso's PP won an outright majority in last year's local elections.

To qualify, applicants cannot have lived in Spain in the past five years and they must maintain their investment and tax residence in the region for a minimum of six years.

The deduction will retroactively apply to transactions carried out since Jan. 1 of this year.

However, it does not include investments in real estate, a controversial feature that was dropped after Ayuso's previous attempts to impose the tax cut sparked a clash with her allies.

The far-right Vox party - whose backing had paved the way for Ayuso's rise to power in 2019 - rejected the measure last year, saying it was unfair to locals who struggled to afford housing.

At the time, the regional government countered that the tax cut would also act as an incentive for Madrid natives who had gone abroad to move back.

In April, Spain scrapped its so-called "golden visa" programme granting residency rights to foreigners making large real estate investments in the country.

(Reporting by David Latona; Editing by William Maclean)