Portugal's banks will get up to 12 billion euros ($17.8 billion) to recapitalize under a rescue plan, enabling them to rebuild their balance sheet strength gradually, an official source said.

The source close to the bailout process told Reuters banks would have to raise their core Tier 1 capital ratio -- a gauge of higher quality capital that mainly comprises equity and retained earnings -- to 9 percent at the end of this year and to 10 percent by the end of 2012.

To get to 9 percent the top five banks would need about 2 billion euros and require about double that to get to 10 percent, according to Reuters estimates.

I don't think any of the banks will need to access this fund and require state intervention, said Prathmesh Dave, analyst at Nomura in London, in regard to reaching the 9 percent target.

The main threat is that stresses on banks rise and loan losses will swell as the economy worsens and margins shrink, which would depress earnings and add to the amount they need, especially if there is a prolonged recession.

The new minimum levels are higher than the Bank of Portugal's end-2011 requirement that banks hold capital of 8 percent, and a global standard of 7 percent, although European peers are building cushions well above that.

Aid for the banks is part of an official 78 billion euro EU/IMF bailout deal for Portugal, following on from rescue deals for Greece and Ireland.

The government would help banks to recapitalize if they are unable to meet the targets by temporarily taking stakes, the source said.

But unlike their Irish peers, the Portuguese lenders do not need massive, urgent injections.

Millennium bcp is most in need, with a 6.7 percent core Tier 1 ratio, but is already raising 1.3 billion euros to lift the ratio to near 9 percent by mid-year. To reach 10 percent it would need just under 2 billion euros from now.

Banco Espirito Santo's core Tier 1 ratio was 7.9 percent at the end of 2010, so it would need about 1.4 billion euros to get to 10 percent. It should be able to achieve that by retained earnings and asset sales, analysts said.

BPI and state-owned Caixa Geral de Depositos have capital ratios of near 9 percent and Santander Totta already has over 10 percent.

ECB DEPENDENCY

The capital of these banks isn't really the main problem at the moment. The focus is their dependency on the ECB for liquidity and how they can get out of that and somehow fund themselves in the wholesale market again, said Carlo Mareels, banks analyst for RBC Capital Markets.

Portugal's banks have been unable to raise funds in wholesale markets for a year, showing how intertwined the fortunes of the state and lenders has become in peripheral euro-zone countries.

That has squeezed margins as they fight for retail deposits, straining their capital positions.

In addition to the threat of higher loan losses, the falling value of government bonds they hold is a further negative, while their capital is also exposed to changes in staff pension obligations, so if equity markets perform badly deductions could increase and weaken capital.

The bailout memorandum still has to be approved by the main opposition parties.

(Reporting by Sergio Goncalves in Lisbon and Steve Slater and Sarah White in London; Editing by Kim Coghill and Jane Merriman)

($1=.6751 Euro)