The Spanish government will take a majority stake in yet another smaller lender as its clean-up of the troubled financial sector gathers pace and the 'bad bank' designed to take on toxic real estate assets takes shape.

The government said on Thursday it had secured the private investment it needed to get its 'bad bank' going, with most of the capital coming from the country's top lenders, except for BBVA .

The asset management company, known by Spanish acronym Sareb, will house rotten real estate loans and properties from Spain's most ailing lenders, including four nationalized banks that need 37 billion euros ($48.25 billion) in European aid.

At the same time, Spain's government is in the process of taking over more banks or taking minority stakes in small lenders, as many struggle to find the capital they need to cope with their real estate woes and an economic downturn.

Spain had to appeal to Europe this year for help for its banks hit by the 2008 collapse of a long property boom, but the country continues in the eye of the euro zone debt storm and Prime Minister Mariano Rajoy is considering asking for a bailout for public finances as well.

Small, unlisted lender Banco Mare Nostrum (BMN) has long been seen as one of the next in line for help, and the government will now take a stake of over 50 percent stake in the bank, a BMN spokesman said on Thursday.

Originally BMN, with total assets close to 70 billion euros, had planned to bridge a capital shortfall with an injection of temporary state aid, resulting in the government taking a minority stake.

"We don't know the exact amount yet but it will easily be more than 50 percent and it will be a direct capital injection," the spokesman said.

Another savings bank, Caja Duero, is also likely to need additional state aid on top of loans it has already received. But it is still unclear whether the government will take a majority stake, a source familiar with the matter said.

Spain's biggest, healthier lenders are also participating in the clean-up. The likes of Santander and Caixabank will be putting in most of the private capital needed by Sareb, the government said, adding that a first capital injection had already taken place.

The bad bank will have an initial capital base of 3.8 billion euros and will eventually reach 5.0 billion, of which 25 percent is equity and the remaining subordinated debt, the economy ministry said.

About 44 billion euros of troubled property assets are due to be transferred to Sareb by year-end and a second capital injection, from yet more Spanish banks and insurers, will go ahead in the next few days, Spain's government added.

Spain needed private investors to provide at least half of that capital, to reduce the burden on state finances. It had been hoping to attract foreign funds as equity investors too, but that is unlikely to happen until at least February or March next year, sources told Reuters last week.

(Reporting By Sonya Dowsett, Jesus Aguado and Carlos Ruano, Writing by Sarah White; Editing by Tracy Rucinski and Fiona Ortiz)