Spain is drawing up legislation that will allow the country's central bank to intervene earlier when a lender falls into trouble as well as giving its bank rescue fund powers to shut them down if they fail to come up with survival plans, an Economy Ministry spokeswoman said Thursday.

The measures are designed to avoid a repeat of the problems like that of Bankia, the leading bank that revealed it needed €19 billion ($23.65 billion) to shore up its balance sheet only after it was nationalized in May.

The country's banks are sitting on an estimated €176 billion in bad real estate loans and other investments following the collapse of the real estate market in 2008 and are now short of capital. So far, eight banks have been taken over.

Spain is tightening its bank controls so it can tap a €100 billion aid package for its troubled lenders from the other 16 countries that use the euro.

An official who spoke on condition of anonymity in keeping with ministry rules said the bill could still undergo changes before its expected approval at Friday's weekly Cabinet meeting.

The measure will also cover banks that meet solvency requirements but are uncertain of fulfilling them in the future.

The results of a comprehensive audit of all Spanish banks are expected next month.

The government has also said that Friday's meeting will approve a new law creating a "bad bank" that will pool much of the sector's soured investments, another requirement for receiving the eurozone aid. Spanish newspapers, however, said much preparatory work had still to be done and the law may be delayed for another week. The ministry official could not say when the bill would be presented.

Conservative Prime Minister Mariano Rajoy has said the Cabinet meeting would also approve an extension of a policy due to have expired last Wednesday under which long-term unemployed people receive monthly payments of €400.

Investors have taken flight from Spain as the uncertainty over the whether the country can afford to contain the problems in its banking sector continues unabated. This has sent Spain's borrowing costs on the international bond markets to worryingly high levels.

The country has so far avoided following Greece, Ireland, Portugal and Cyprus in having its entire economy bailed out. However, Rajoy has said that he hasn't ruled out approaching the eurozone's bailout fund for assistance — provided the European Central Bank outlines its plans to help bring down the country's sky-high borrowing costs.