Freedom of information in Spain came one step nearer Friday after the recently-elected government agreed to introduce a bill in response to widespread disgust over corruption and mismanagement by elected officials of both main political parties.

The country's Cabinet agreed to put forward legislation that will allow Spaniards to find out more about how their money is spent by government. Spain, which is struggling to get its public finances under control, is one of Europe's few countries without wide-ranging freedom of information legislation.

"It is a law whose main goal is improve the credibility of and trust in our institutions, especially government ones," Deputy Prime Minister Soraya Saenz de Santamaria said.

The legislation will take months to come into effect, after an unprecedented 15-day period in which the general public can make suggestions on what should be accessible to them and how the law should work. After that, the bill has to be go through normal Parliamentary procedures.

Though the salaries of the prime minister and government ministers are already public information, as are the national budget and much other money-related data, not all of it is easy to access.

But under the new bill, information on subjects including senior public servants' salaries and detailed data on government contracts and subsidies will be published online. Spaniards will also be able to file requests for other kinds of information providing it does not breach national security or personal privacy.

The goal of the new law is to make public officials at all levels much more accountable for how they spend taxpayer money. People will be able to get information just by the click of a mouse.

"It is a law that tries to give rigor to compliance with budget and financial obligations that were unknown until now, but will serve to restore credibility to all levels of government," Saenz de Santa Maria said.

News of the Cabinet's support for a package that should make for more open government comes as the country struggles to avoid the same fate as other indebted European countries. The newly-elected conservative government is trying to convince investors that it has a strategy to deal with its debts so it won't follow Greece, Ireland and Portugal in needing a bailout.

Concerns have swelled recently after figures showed the country's borrowing last year was way more than expected, due in large part to overspending by regional governments but also because the economy is shrinking and laying siege to tax revenues.

And a new code of good governance included in the law will make it easier to fire government officials _ and ban them from serving anew for up to 10 years _ if they do things such as fail to set or meet deficit-reduction targets under a balanced budget law, planned for 2020.